From 96edfe46dd79ad9dee66fcc29d92c0a3b8442677 Mon Sep 17 00:00:00 2001 From: Dave Tong Date: Thu, 19 Jan 2012 23:44:02 +1100 Subject: [PATCH] Initialise list sample --- .gitignore | 2 + build.sh | 7 + run.sh | 2 + src/BindingExamples.java | 50 ++ src/koorong/Book.java | 1387 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 1448 insertions(+) create mode 100644 .gitignore create mode 100755 build.sh create mode 100755 run.sh create mode 100644 src/BindingExamples.java create mode 100755 src/koorong/Book.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..db9d25b --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.DS_Store +bin/* \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..6ecb65c --- /dev/null +++ b/build.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# javac -d bin src/xep/samples/*.java + +# sourcepath: reference the other source files e.g. Core.java +# classpath: reference the class files and libraries e.g. class and jar extensions +# javac -d bin -sourcepath src -classpath bin:$CLASSPATH src/xep/test/Basic.java +javac -d bin -classpath bin:$CLASSPATH src/BindingExamples.java \ No newline at end of file diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..0b0233b --- /dev/null +++ b/run.sh @@ -0,0 +1,2 @@ +#!/bin/bash +java -classpath bin:$CLASSPATH BindingExamples \ No newline at end of file diff --git a/src/BindingExamples.java b/src/BindingExamples.java new file mode 100644 index 0000000..b1bd55b --- /dev/null +++ b/src/BindingExamples.java @@ -0,0 +1,50 @@ +import koorong.*; +import java.sql.*; +import com.intersys.objects.*; + +public class BindingExamples { + public static void main(String[] args){ + try { + Database db = getDatabase(); + System.out.println("\nConnected to DB... "); + + CreateBlankBook(db); + CreateBook(db); + } + catch (Exception ex) { + System.out.println("Caught exception: " + ex.getClass().getName() + ": " + ex.getMessage()); + } + } + + public static Database getDatabase() throws CacheException{ + String url="jdbc:Cache://localhost:56121/USER"; + String username="_SYSTEM"; + String pwd="SYS"; + Database db = CacheDatabase.getDatabase(url, username, pwd); + return db; + } + + public static void CreateBlankBook(Database db) { + try { + Book book = new Book(db); + System.out.println("Created new Book... "); + + int success = book.save(); + System.out.println("Saved Book... "); + } + catch (Exception ex) { + System.out.println("Caught exception: " + ex.getClass().getName() + ": " + ex.getMessage()); + } + } + + // CreateBook (com.intersys.objects.Database db, java.util.List tags) throws com.intersys.objects.CacheException { + public static void CreateBook(Database db) { + try { + CreateBook(db); + System.out.println("Called CreateBook function... "); + } + catch (Exception ex) { + System.out.println("Caught exception: " + ex.getClass().getName() + ": " + ex.getMessage()); + } + } +} \ No newline at end of file diff --git a/src/koorong/Book.java b/src/koorong/Book.java new file mode 100755 index 0000000..e2f14a0 --- /dev/null +++ b/src/koorong/Book.java @@ -0,0 +1,1387 @@ +package koorong; + + +/** + * Cache' Java Class Generated for class koorong.Book on version Cache for UNIX (Apple Mac OS X for x86-64) 2012.1 (Build 531) Mon Dec 5 2011 17:35:19 EST.
+ * + * @see NB: DO NOT USE IN APPLICATION(!!!). +
Use koorong.Book.open instead!

+

+ Used to construct a Java object, corresponding to existing object + in Cache database. +

+ @see #_open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #open(com.intersys.objects.Database, com.intersys.objects.Oid) + */ + public Book (com.intersys.cache.CacheObject ref) throws com.intersys.objects.CacheException { + super (ref); + } + public Book (com.intersys.objects.Database db, String initstr) throws com.intersys.objects.CacheException { + super (((com.intersys.cache.SysDatabase)db).newCacheObject (CACHE_CLASS_NAME,initstr)); + } + /** + Creates a new instance of object "koorong.Book" in Cache + database and corresponding object of class + koorong.Book. + + @param db Database object used for connection with + Cache database. + + @throws com.intersys.objects.CacheException in case of error. + + @see #_open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #open(com.intersys.objects.Database, com.intersys.objects.Oid) + */ + public Book (com.intersys.objects.Database db) throws com.intersys.objects.CacheException { + super (((com.intersys.cache.SysDatabase)db).newCacheObject (CACHE_CLASS_NAME)); + } + /** + * Calls method + * {@link com.intersys.objects.Database#createObjects(String, java.util.Collection)} + * to save a collection of previously created new objects in Cache + * Database. No object in collection could been saved before. All + * objects must be instances of koorong.Book and not of its + * subclasses. To save changes in objects that already exist in + * the database use saveObjects method or instance + * method save on the object itself. + * + * @param db Database object used for connection with + * Cache database. + * + * @param objects A collection of newly created objects. None of + * the objects in the collection may already exist in database. + * + * @see #saveObjects(com.intersys.objects.Database, java.util.Collection) + * @see com.intersys.objects.Database#createObjects(String, java.util.Collection) + * + */ + public static void createObjects (com.intersys.objects.Database db, java.util.Collection objects) throws com.intersys.objects.CacheException { + db.createObjects (CACHE_CLASS_NAME, objects); + } + /** + Runs method %OpenId in Cache to open an object + from Cache database and creates corresponding object of class + koorong.Book. + + @return RegisteredObject , corresponding to opened + object. This object may be of koorong.Book or of + any of its subclasses. Cast to koorong.Book is + guaranteed to pass without ClassCastException exception. + + @param db Database object used for connection with + Cache database. + + @param id ID as specified in Cache represented as + Id. + + @throws com.intersys.objects.CacheException in case of error. + @see java.lang.ClassCastException + @see #_open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #Book + */ + public static com.intersys.classes.RegisteredObject _open (com.intersys.objects.Database db, com.intersys.objects.Id id) throws com.intersys.objects.CacheException { + return open(db, id); + } + /** + Runs method %OpenId in Cache to open an object + from Cache database and creates corresponding object of class + koorong.Book. + + @return RegisteredObject , corresponding to opened + object. This object may be of koorong.Book or of + any of its subclasses. Cast to koorong.Book is + guaranteed to pass without ClassCastException exception. + + @param db Database object used for connection with + Cache database. + + @param id ID as specified in Cache represented as + Id. + + @throws com.intersys.objects.CacheException in case of error. + @see java.lang.ClassCastException + @see #_open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #Book + */ + public static com.intersys.classes.RegisteredObject open (com.intersys.objects.Database db, com.intersys.objects.Id id) throws com.intersys.objects.CacheException { + com.intersys.cache.CacheObject cobj = (((com.intersys.cache.SysDatabase)db).openCacheObject(CACHE_CLASS_NAME, id.toString())); + return (com.intersys.classes.RegisteredObject)(cobj.newJavaInstance()); + } + /** + Runs method %OpenId in Cache to open an object + from Cache database and creates corresponding object of class + koorong.Book. + + @return RegisteredObject , corresponding to opened + object. This object may be of koorong.Book or of + any of its subclasses. Cast to koorong.Book is + guaranteed to pass without ClassCastException exception. + + @param db Database object used for connection with + Cache database. + + @param id ID as specified in Cache represented as + Id. + @param concurrency Concurrency level. represented as + Concurrency. + + Here are concurrency values, see Object Concurrency Options in your on-line Cache' documentation for more information. + @see
Object Concurrency Options. + + + + + + + + + +
Object Concurrency Options
-1 Default concurrency
0 No locking, no locks are used
1 Atomic
2 Shared
3 Shared/Retained
4 Exclusive
+ + @throws com.intersys.objects.CacheException in case of error. + @see java.lang.ClassCastException + @see #_open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #Book + */ + public static com.intersys.classes.RegisteredObject _open (com.intersys.objects.Database db, com.intersys.objects.Id id, int concurrency) throws com.intersys.objects.CacheException { + return open(db, id, concurrency); + } + /** + Runs method %OpenId in Cache to open an object + from Cache database and creates corresponding object of class + koorong.Book. + + @return RegisteredObject , corresponding to opened + object. This object may be of koorong.Book or of + any of its subclasses. Cast to koorong.Book is + guaranteed to pass without ClassCastException exception. + + @param db Database object used for connection with + Cache database. + + @param id ID as specified in Cache represented as + Id. + @param concurrency Concurrency level. represented as + Concurrency. + + Here are concurrency values, see Object Concurrency Options in your on-line Cache' documentation for more information. + @see Object Concurrency Options. + + + + + + + + + +
Object Concurrency Options
-1 Default concurrency
0 No locking, no locks are used
1 Atomic
2 Shared
3 Shared/Retained
4 Exclusive
+ + @throws com.intersys.objects.CacheException in case of error. + @see java.lang.ClassCastException + @see #_open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #Book + */ + public static com.intersys.classes.RegisteredObject open (com.intersys.objects.Database db, com.intersys.objects.Id id, int concurrency) throws com.intersys.objects.CacheException { + com.intersys.cache.CacheObject cobj = (((com.intersys.cache.SysDatabase)db).openCacheObject(CACHE_CLASS_NAME, id.toString(), concurrency)); + return (com.intersys.classes.RegisteredObject)(cobj.newJavaInstance()); + } + /** + Runs method %Open in Cache to open an object + from Cache database and creates corresponding object of class + koorong.Book. + + @return RegisteredObject , corresponding to opened + object. This object may be of koorong.Book or of + any of its subclasses. Cast to koorong.Book is + guaranteed to pass without ClassCastException exception. + + @param db Database object used for connection with + Cache database. + @param oid Object ID as specified in Cache. represented as + Oid. + + + @throws com.intersys.objects.CacheException in case of error. + @see java.lang.ClassCastException + @see #_open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #Book(com.intersys.objects.Database) + */ + public static com.intersys.classes.RegisteredObject _open (com.intersys.objects.Database db, com.intersys.objects.Oid oid) throws com.intersys.objects.CacheException { + return open(db, oid); + } + /** + Runs method %Open in Cache to open an object + from Cache database and creates corresponding object of class + koorong.Book. + + @return RegisteredObject , corresponding to opened + object. This object may be of koorong.Book or of + any of its subclasses. Cast to koorong.Book is + guaranteed to pass without ClassCastException exception. + + @param db Database object used for connection with + Cache database. + @param oid Object ID as specified in Cache. represented as + Oid. + + + @throws com.intersys.objects.CacheException in case of error. + @see java.lang.ClassCastException + @see #_open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #Book(com.intersys.objects.Database) + */ + public static com.intersys.classes.RegisteredObject open (com.intersys.objects.Database db, com.intersys.objects.Oid oid) throws com.intersys.objects.CacheException { + com.intersys.cache.CacheObject cobj = (((com.intersys.cache.SysDatabase)db).openCacheObject(CACHE_CLASS_NAME, oid.getData())); + return (com.intersys.classes.RegisteredObject)(cobj.newJavaInstance()); + } + /** + Runs method %Open in Cache to open an object + from Cache database and creates corresponding object of class + koorong.Book. + + @return RegisteredObject , corresponding to opened + object. This object may be of koorong.Book or of + any of its subclasses. Cast to koorong.Book is + guaranteed to pass without ClassCastException exception. + + @param db Database object used for connection with + Cache database. + @param oid Object ID as specified in Cache. represented as + Oid. + @param concurrency Concurrency level. represented as + Concurrency. + + Here are concurrency values, see Object Concurrency Options in your on-line Cache' documentation for more information. + @see Object Concurrency Options. + + + + + + + + + +
Object Concurrency Options
-1 Default concurrency
0 No locking, no locks are used
1 Atomic
2 Shared
3 Shared/Retained
4 Exclusive
+ + @throws com.intersys.objects.CacheException in case of error. + @see java.lang.ClassCastException + @see #_open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #Book(com.intersys.objects.Database) + */ + public static com.intersys.classes.RegisteredObject _open (com.intersys.objects.Database db, com.intersys.objects.Oid oid, int concurrency) throws com.intersys.objects.CacheException { + return open(db, oid, concurrency); + } + /** + Runs method %Open in Cache to open an object + from Cache database and creates corresponding object of class + koorong.Book. + + @return RegisteredObject , corresponding to opened + object. This object may be of koorong.Book or of + any of its subclasses. Cast to koorong.Book is + guaranteed to pass without ClassCastException exception. + + @param db Database object used for connection with + Cache database. + @param oid Object ID as specified in Cache. represented as + Oid. + @param concurrency Concurrency level. represented as + Concurrency. + + Here are concurrency values, see Object Concurrency Options in your on-line Cache' documentation for more information. + @see Object Concurrency Options. + + + + + + + + + +
Object Concurrency Options
-1 Default concurrency
0 No locking, no locks are used
1 Atomic
2 Shared
3 Shared/Retained
4 Exclusive
+ + @throws com.intersys.objects.CacheException in case of error. + @see java.lang.ClassCastException + @see #_open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #Book(com.intersys.objects.Database) + */ + public static com.intersys.classes.RegisteredObject open (com.intersys.objects.Database db, com.intersys.objects.Oid oid, int concurrency) throws com.intersys.objects.CacheException { + com.intersys.cache.CacheObject cobj = (((com.intersys.cache.SysDatabase)db).openCacheObject(CACHE_CLASS_NAME, oid.getData(), concurrency)); + return (com.intersys.classes.RegisteredObject)(cobj.newJavaInstance()); + } + /** + * Calls method + * {@link com.intersys.objects.Database#openByQuery(String, String, Object[])} + * to open all instances of class koorong.Book + * that satisfy given simple + * condition, specified in SQL syntax. + * + * @param db Database object used for connection with + * Cache database. + * + * @param condition Simple condition on objects, in SQL syntax. It + * can refer only to properties of a single object. + * + * @param args Parameters to replace "?" in + * condition. If there are no parameters in condition + * may be null or empty array. + * + * @return Iterator in the form of + * java.util.Iterator, that iterates over all opened + * objects in specified order. + * + * @see #openByQuery(com.intersys.objects.Database, String) + * @see com.intersys.objects.Database#openByQuery(String, String, Object[]) + * @see com.intersys.objects.Database#openByQuery(String, String) + * @see com.intersys.objects.Database#openByQuery(String, Object[]) + * @see com.intersys.objects.Database#openByQuery(String) + * + */ + public static java.util.Iterator openByQuery (com.intersys.objects.Database db, String condition, Object[] args) throws com.intersys.objects.CacheException { + return db.openByQuery (CACHE_CLASS_NAME, condition, args); + } + /** + * Calls method + * {@link com.intersys.objects.Database#openByQuery(String, String)} + * to open all instances of class Sample.Person + * that satisfy given simple + * condition, specified in SQL syntax. + * + * @param db Database object used for connection with + * Cache database. + * + * @param condition Simple condition on objects, in SQL syntax. It + * can refer only to properties of a single object. + * + * @return Iterator in the form of + * java.util.Iterator, that iterates over all opened + * objects in specified order. + * + * @see #openByQuery(com.intersys.objects.Database, String, Object[]) + * @see com.intersys.objects.Database#openByQuery(String, String) + * @see com.intersys.objects.Database#openByQuery(String, String, Object[]) + * @see com.intersys.objects.Database#openByQuery(String, Object[]) + * @see com.intersys.objects.Database#openByQuery(String) + * + */ + public static java.util.Iterator openByQuery (com.intersys.objects.Database db, String condition) throws com.intersys.objects.CacheException { + return db.openByQuery (CACHE_CLASS_NAME, condition); + } + /** + * Calls method + * {@link com.intersys.objects.Database#saveObjects(String, + java.util.Collection)} + * to save a collection of previously created new objects in Cache + * Database. All object in + * collection must already exist in database. All + * objects must be instances of koorong.Book and not of its + * subclasses. To save + * changes in newly created objects use createObjects + * method or instance method save on the object + * itself. + * + * @param db Database object used for connection with + * Cache database. + * + * @param objects A collection of newly created objects. None of + * the objects in the collection may already exist in database. + * + * @see #saveObjects(com.intersys.objects.Database, java.util.Collection) + * @see com.intersys.objects.Database#createObjects(String, java.util.Collection) + * + */ + public static void saveObjects (com.intersys.objects.Database db, java.util.Collection objects) throws com.intersys.objects.CacheException { + db.saveObjects (CACHE_CLASS_NAME, objects); + } + /** + Runs method %Delete in Cache to delete an object + from Cache database. + + Deletes the stored version of the object with OID oid from the database. + It does not remove any in-memory versions of the object that may be present. + + @param db Database object used for connection with + Cache database. + + @param id ID as specified in Cache represented as + Id. + + @throws com.intersys.objects.CacheException in case of error. + @see java.lang.ClassCastException + @see #_deleteId(com.intersys.objects.Database, com.intersys.objects.Id) + @see #Book + */ + public static void delete (com.intersys.objects.Database db, com.intersys.objects.Id id) throws com.intersys.objects.CacheException { + ((com.intersys.cache.SysDatabase)db).deleteObject(CACHE_CLASS_NAME, id); + } + /** + Runs method %Delete in Cache to delete an object + from Cache database. + + Deletes the stored version of the object with OID oid from the database. + It does not remove any in-memory versions of the object that may be present. + + @param db Database object used for connection with + Cache database. + + @param id ID as specified in Cache represented as + Id. + @param concurrency Concurrency level. represented as + Concurrency. + + Here are concurrency values, see Object Concurrency Options in your on-line Cache' documentation for more information. + @see Object Concurrency Options. + + + + + + + + + +
Object Concurrency Options
-1 Default concurrency
0 No locking, no locks are used
1 Atomic
2 Shared
3 Shared/Retained
4 Exclusive
+ + + @throws com.intersys.objects.CacheException in case of error. + @see java.lang.ClassCastException + @see #_deleteId(com.intersys.objects.Database, com.intersys.objects.Id) + @see #Book + */ + public static void delete (com.intersys.objects.Database db, com.intersys.objects.Id id, int concurrency) throws com.intersys.objects.CacheException { + ((com.intersys.cache.SysDatabase)db).deleteObject(CACHE_CLASS_NAME, id, concurrency); + } + /** + Runs method %Delete in Cache to delete an object + from Cache database. + + Deletes the stored version of the object with OID oid from the database. + It does not remove any in-memory versions of the object that may be present. + + @param db Database object used for connection with + Cache database. + + @param id ID as specified in Cache represented as + Id. + + @throws com.intersys.objects.CacheException in case of error. + @see java.lang.ClassCastException + @see #_deleteId(com.intersys.objects.Database, com.intersys.objects.Id) + @see #Book + */ + public static void _deleteId (com.intersys.objects.Database db, com.intersys.objects.Id id) throws com.intersys.objects.CacheException { + delete(db, id); + } + /** + Runs method %Delete in Cache to delete an object + from Cache database. + + Deletes the stored version of the object with OID oid from the database. + It does not remove any in-memory versions of the object that may be present. + + @param db Database object used for connection with + Cache database. + + @param id ID as specified in Cache represented as + Id. + @param concurrency Concurrency level. represented as + Concurrency. + + Here are concurrency values, see Object Concurrency Options in your on-line Cache' documentation for more information. + @see Object Concurrency Options. + + + + + + + + + +
Object Concurrency Options
-1 Default concurrency
0 No locking, no locks are used
1 Atomic
2 Shared
3 Shared/Retained
4 Exclusive
+ + + @throws com.intersys.objects.CacheException in case of error. + @see java.lang.ClassCastException + @see #_deleteId(com.intersys.objects.Database, com.intersys.objects.Id) + @see #Book + */ + public static void _deleteId (com.intersys.objects.Database db, com.intersys.objects.Id id, int concurrency) throws com.intersys.objects.CacheException { + delete(db, id, concurrency); + } + /** + Runs method %Exists in Cache to see if an object exists. + + @param db Database object used for connection with + Cache database. + + @param id ID as specified in Cache represented as + Id. + + @throws com.intersys.objects.CacheException in case of error. + @see java.lang.ClassCastException + @see #_existsId(com.intersys.objects.Database, com.intersys.objects.Id) + @see #Book + */ + public static boolean exists (com.intersys.objects.Database db, com.intersys.objects.Id id) throws com.intersys.objects.CacheException { + return ((com.intersys.cache.SysDatabase)db).existsObject(CACHE_CLASS_NAME, id); + } + /** + Runs method %Exists in Cache to see if an object exists. + + @param db Database object used for connection with + Cache database. + + @param id ID as specified in Cache represented as + Id. + + @throws com.intersys.objects.CacheException in case of error. + @see java.lang.ClassCastException + @see #_existsId(com.intersys.objects.Database, com.intersys.objects.Id) + @see #Book + */ + public static Boolean _existsId (com.intersys.objects.Database db, com.intersys.objects.Id id) throws com.intersys.objects.CacheException { + return new Boolean(exists(db, id)); + } + /** + Returns class name of the class koorong.Book as it is in + Cache Database. Note, that this is a static method, so no + object specific information can be returned. Use + getCacheClass().getName() to get the class name + for specific object. + @return Cache class name as a String + @see #getCacheClass() + @see com.intersys.objects.reflect.CacheClass#getName() + */ + public static String getCacheClassName( ) { + return CACHE_CLASS_NAME; + } + + /** + Allows access metadata information about type of this object + in Cache database. Also can be used for dynamic binding (accessing + properties and calling methods without particular class known). + + @return CacheClass object for this object type. + */ + public com.intersys.objects.reflect.CacheClass getCacheClass( ) throws com.intersys.objects.CacheException { + return mInternal.getCacheClass(); + } + + public static void checkAllFieldsValid(com.intersys.objects.Database db ) throws com.intersys.objects.CacheException { + } + + /** + Runs method %Exists in Cache to see if an object exists. + + @return RegisteredObject , corresponding to opened + object. This object may be of koorong.Book or of + any of its subclasses. Cast to koorong.Book is + guaranteed to pass without ClassCastException exception. + + @param db Database object used for connection with + Cache database. + + @param oid Object ID as specified in Cache. represented as + Oid. + + @throws com.intersys.objects.CacheException in case of error. + @see java.lang.ClassCastException + @see #_open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #open(com.intersys.objects.Database, com.intersys.objects.Oid) + @see #Book + */ + public static boolean exists (com.intersys.objects.Database db, com.intersys.objects.Oid oid) throws com.intersys.objects.CacheException { + return exists (db, oid, CACHE_CLASS_NAME); + } + + /** + Verifies that all fields from Cache class are exposed with + accessor methods in Java class and that values for indexes in + zObjVal are the same as in Cache. It does not return anything + but it throws an exception in case of inconsistency. + +

But if there is any inconsistency in zObjVal indexes this is fatal and class can not work correctly and must be regenerated + + @param db Database used for connection. Note that if you are + using multiple databases the class can be consistent with one + and inconsistent with another. + @throws com.intersys.objects.InvalidClassException if any inconsistency is found. + @throws com.intersys.objects.CacheException if any error occurred during + verification, e.g. communication error with Database. + @see com.intersys.objects.InvalidPropertyException + + */ + public static void checkAllMethods(com.intersys.objects.Database db ) throws com.intersys.objects.CacheException { + checkAllMethods(db, CACHE_CLASS_NAME, Book.class); + } + public static void checkTagsValid (com.intersys.objects.Database db) throws com.intersys.objects.CacheException { + } + /** + Returns value of property Tags. + + @return current value of Tags represented as + com.intersys.classes.ListOfDataTypes + + @throws com.intersys.objects.CacheException if any error occurred during value retrieval. + @see Tags + */ + public com.intersys.classes.ListOfDataTypes getTags() throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder dh = mInternal.getProperty("Tags",true); + com.intersys.cache.CacheObject cobj = dh.getCacheObject(); + if (cobj == null) + return null; + return (com.intersys.classes.ListOfDataTypes)(cobj.newJavaInstance()); + } + + /** + Sets new value for Tags. + + @param value new value to be set represented as + com.intersys.classes.ListOfDataTypes. + @throws com.intersys.objects.CacheException if any error occurred during value setting. + @see Tags + */ + public void setTags(com.intersys.classes.ListOfDataTypes value) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value); + mInternal.setProperty("Tags", dh); + return; + } + + /** +

Runs method %ClassName in Cache.

+

Description: Returns the object's class name. The fullname determines how the +class name is represented. If it is 1 then it returns the full class name +including any package qualifier. If it is 0 (the default) then it returns the +name of the class without the package, this is mainly for backward compatibility +with the pre-package behaviour of %ClassName.

+ @param db represented as com.intersys.objects.Database + @param fullname represented as java.lang.Boolean + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method %ClassName + */ + public static java.lang.String sys_ClassName (com.intersys.objects.Database db, java.lang.Boolean fullname) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(fullname); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%ClassName",args,com.intersys.objects.Database.RET_PRIM); + return res.getString(); + } + /** +

Runs method %ComposeOid in Cache.

+

Description: %ComposeOid() + + This class method accepts an ID and returns a fully qualified OID, containing the most specific type class of the object identified by the + id argument. If default storage is used then the %%CLASSNAME value is used to determine the most specific type class, otherwise call + %OnDetermineClass to determine the most specific type class. If neither case is true then the current class is + used. If there is a problem determining the most specific type class then null ("") is returned.

+ @param db represented as com.intersys.objects.Database + @param id represented as java.lang.String + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method %ComposeOid + */ + public static void sys_ComposeOid (com.intersys.objects.Database db, java.lang.String id) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(id); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%ComposeOid",args,com.intersys.objects.Database.RET_NONE); + return; + } + /** +

Runs method %Delete in Cache.

+

Description: Deletes the stored version of the object with OID oid from the database. +It does not remove any in-memory versions of the object that may be present. + +Refer to About Concurrency for more details +on the optional concurrency argument. + +

Returns a %Status value indicating success or failure. + +

Internally, %Delete initiates a transaction and then invokes the storage +interface method %DeleteData. If %DeleteData succeeds, the +transaction is committed, otherwise it is rolled back.

+ @param db represented as com.intersys.objects.Database + default argument oid set to "" + default argument concurrency set to -1 + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see #sys_Delete(com.intersys.objects.Database,com.intersys.objects.Oid,java.lang.Integer) + @see Method %Delete + */ + public static void sys_Delete (com.intersys.objects.Database db) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[0]; + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%Delete",args,com.intersys.objects.Database.RET_PRIM); + db.parseStatus(res); + return; + } + /** +

Runs method %Delete in Cache.

+

Description: Deletes the stored version of the object with OID oid from the database. +It does not remove any in-memory versions of the object that may be present. + +Refer to About Concurrency for more details +on the optional concurrency argument. + +

Returns a %Status value indicating success or failure. + +

Internally, %Delete initiates a transaction and then invokes the storage +interface method %DeleteData. If %DeleteData succeeds, the +transaction is committed, otherwise it is rolled back.

+ @param db represented as com.intersys.objects.Database + @param oid represented as com.intersys.objects.Oid + default argument concurrency set to -1 + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see #sys_Delete(com.intersys.objects.Database,com.intersys.objects.Oid,java.lang.Integer) + @see Method %Delete + */ + public static void sys_Delete (com.intersys.objects.Database db, com.intersys.objects.Oid oid) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(oid); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%Delete",args,com.intersys.objects.Database.RET_PRIM); + db.parseStatus(res); + return; + } + /** +

Runs method %Delete in Cache.

+

Description: Deletes the stored version of the object with OID oid from the database. +It does not remove any in-memory versions of the object that may be present. + +Refer to About Concurrency for more details +on the optional concurrency argument. + +

Returns a %Status value indicating success or failure. + +

Internally, %Delete initiates a transaction and then invokes the storage +interface method %DeleteData. If %DeleteData succeeds, the +transaction is committed, otherwise it is rolled back.

+ @param db represented as com.intersys.objects.Database + @param oid represented as com.intersys.objects.Oid + @param concurrency represented as java.lang.Integer + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method %Delete + */ + public static void sys_Delete (com.intersys.objects.Database db, com.intersys.objects.Oid oid, java.lang.Integer concurrency) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[2]; + args[0] = new com.intersys.cache.Dataholder(oid); + args[1] = new com.intersys.cache.Dataholder(concurrency); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%Delete",args,com.intersys.objects.Database.RET_PRIM); + db.parseStatus(res); + return; + } + /** +

Runs method %DeleteExtent in Cache.

+

Description: Delete all instances of this class from its extent. On exit instancecount +contains the original number of instances while deletecount contains +the number of instances actually deleted. + +

Internally, %DeleteExtent iterates over the set of instances in the +collection and invokes the %Delete method. + +Refer to About Concurrency for more details +on the optional concurrency argument. + +The option pInitializeExtent argument allows the user to override the default behavior +of calling %KillExtent when all instances are successfully deleted. %KillExtent +is called by default when the extent is empty so that empty globals can be killed. If %KillExtent +is not called then some empty globals can remain as well as the ID counter if it exists. The default value for pInitializeExtent +is 1. Unless the caller specifies a false value for pInitializeExtent the globals used by the extent will be killed. In some +cases, the globals used by the extent are not used exclusively by the extent. In those cases it is possible that some globals will still be defined +even when pInitializeExtent is true. + +

Returns a %Status value indicating success or failure.

+ @param db represented as com.intersys.objects.Database + @param concurrency represented as java.lang.Integer + @param deletecount represented as com.intersys.objects.StringHolder + @param instancecount represented as com.intersys.objects.StringHolder + default argument pInitializeExtent set to 1 + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see #sys_DeleteExtent(com.intersys.objects.Database,java.lang.Integer,com.intersys.objects.StringHolder,com.intersys.objects.StringHolder,java.lang.Integer) + @see Method %DeleteExtent + */ + public static void sys_DeleteExtent (com.intersys.objects.Database db, java.lang.Integer concurrency, com.intersys.objects.StringHolder deletecount, com.intersys.objects.StringHolder instancecount) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[3]; + int[] _refs = new int[2]; + args[0] = new com.intersys.cache.Dataholder(concurrency); + args[1] = com.intersys.cache.Dataholder.create (deletecount.value); + _refs[0] = 2; + args[2] = com.intersys.cache.Dataholder.create (instancecount.value); + _refs[1] = 3; + com.intersys.cache.Dataholder[] res=db.runClassMethod(CACHE_CLASS_NAME,"%DeleteExtent",_refs,args,com.intersys.objects.Database.RET_PRIM); + deletecount.set(res[1].getString()); + instancecount.set(res[2].getString()); + db.parseStatus(res[0]); + return; + } + /** +

Runs method %DeleteExtent in Cache.

+

Description: Delete all instances of this class from its extent. On exit instancecount +contains the original number of instances while deletecount contains +the number of instances actually deleted. + +

Internally, %DeleteExtent iterates over the set of instances in the +collection and invokes the %Delete method. + +Refer to About Concurrency for more details +on the optional concurrency argument. + +The option pInitializeExtent argument allows the user to override the default behavior +of calling %KillExtent when all instances are successfully deleted. %KillExtent +is called by default when the extent is empty so that empty globals can be killed. If %KillExtent +is not called then some empty globals can remain as well as the ID counter if it exists. The default value for pInitializeExtent +is 1. Unless the caller specifies a false value for pInitializeExtent the globals used by the extent will be killed. In some +cases, the globals used by the extent are not used exclusively by the extent. In those cases it is possible that some globals will still be defined +even when pInitializeExtent is true. + +

Returns a %Status value indicating success or failure.

+ @param db represented as com.intersys.objects.Database + @param concurrency represented as java.lang.Integer + @param deletecount represented as com.intersys.objects.StringHolder + @param instancecount represented as com.intersys.objects.StringHolder + @param pInitializeExtent represented as java.lang.Integer + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method %DeleteExtent + */ + public static void sys_DeleteExtent (com.intersys.objects.Database db, java.lang.Integer concurrency, com.intersys.objects.StringHolder deletecount, com.intersys.objects.StringHolder instancecount, java.lang.Integer pInitializeExtent) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[4]; + int[] _refs = new int[2]; + args[0] = new com.intersys.cache.Dataholder(concurrency); + args[1] = com.intersys.cache.Dataholder.create (deletecount.value); + _refs[0] = 2; + args[2] = com.intersys.cache.Dataholder.create (instancecount.value); + _refs[1] = 3; + args[3] = new com.intersys.cache.Dataholder(pInitializeExtent); + com.intersys.cache.Dataholder[] res=db.runClassMethod(CACHE_CLASS_NAME,"%DeleteExtent",_refs,args,com.intersys.objects.Database.RET_PRIM); + deletecount.set(res[1].getString()); + instancecount.set(res[2].getString()); + db.parseStatus(res[0]); + return; + } + /** +

Runs method %DeleteId in Cache.

+

Description: Deletes the stored version of the object with ID id from the database. + +

%DeleteId is identical in operation to the %Delete method except +that it uses an Id value instead of an OID value to find an object. + +Refer to About Concurrency for more details +on the optional concurrency argument.

+ @param db represented as com.intersys.objects.Database + @param id represented as java.lang.String + default argument concurrency set to -1 + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see #sys_DeleteId(com.intersys.objects.Database,java.lang.String,java.lang.Integer) + @see Method %DeleteId + */ + public static void sys_DeleteId (com.intersys.objects.Database db, java.lang.String id) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(id); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%DeleteId",args,com.intersys.objects.Database.RET_PRIM); + db.parseStatus(res); + return; + } + /** +

Runs method %DeleteId in Cache.

+

Description: Deletes the stored version of the object with ID id from the database. + +

%DeleteId is identical in operation to the %Delete method except +that it uses an Id value instead of an OID value to find an object. + +Refer to About Concurrency for more details +on the optional concurrency argument.

+ @param db represented as com.intersys.objects.Database + @param id represented as java.lang.String + @param concurrency represented as java.lang.Integer + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method %DeleteId + */ + public static void sys_DeleteId (com.intersys.objects.Database db, java.lang.String id, java.lang.Integer concurrency) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[2]; + args[0] = new com.intersys.cache.Dataholder(id); + args[1] = new com.intersys.cache.Dataholder(concurrency); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%DeleteId",args,com.intersys.objects.Database.RET_PRIM); + db.parseStatus(res); + return; + } + /** +

Runs method %Exists in Cache.

+

Description: %Exists() + Check to see if an OID exists in the extent of this class...

+ @param db represented as com.intersys.objects.Database + default argument oid set to "" + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see #sys_Exists(com.intersys.objects.Database,com.intersys.objects.Oid) + @see Method %Exists + */ + public static java.lang.Boolean sys_Exists (com.intersys.objects.Database db) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[0]; + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%Exists",args,com.intersys.objects.Database.RET_PRIM); + return res.getBoolean(); + } + /** +

Runs method %Exists in Cache.

+

Description: %Exists() + Check to see if an OID exists in the extent of this class...

+ @param db represented as com.intersys.objects.Database + @param oid represented as com.intersys.objects.Oid + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method %Exists + */ + public static java.lang.Boolean sys_Exists (com.intersys.objects.Database db, com.intersys.objects.Oid oid) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(oid); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%Exists",args,com.intersys.objects.Database.RET_PRIM); + return res.getBoolean(); + } + /** +

Runs method %ExistsId in Cache.

+

Description: %ExistsId() + Check to see if an ID exists in the extent of this class...

+ @param db represented as com.intersys.objects.Database + @param id represented as java.lang.String + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method %ExistsId + */ + public static java.lang.Boolean sys_ExistsId (com.intersys.objects.Database db, java.lang.String id) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(id); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%ExistsId",args,com.intersys.objects.Database.RET_PRIM); + return res.getBoolean(); + } + /** +

Runs method %IsA in Cache.

+

Description: Returns true (1) if instances of this class are also instances of the isclass parameter. +That is 'isclass' is a primary superclass of this object.

+ @param db represented as com.intersys.objects.Database + @param isclass represented as java.lang.String + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method %IsA + */ + public static java.lang.Integer sys_IsA (com.intersys.objects.Database db, java.lang.String isclass) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(isclass); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%IsA",args,com.intersys.objects.Database.RET_PRIM); + return res.getInteger(); + } + /** +

Runs method %KillExtent in Cache.

+

Description: %KillExtent performs a physical kill of the extent. No constraints are enforced. This method should not be +used in place of %DeleteExtent. Only physical storage occupied by this extent will be killed. If this extent +is a subextent of another class then no data is killed. Indexes that originate with this extent will be killed. +%KillExtent will be called on any subextents and on any child extents (the extent of the type class of a +relationship whose cardinality = children is a 'child' extent) of this extent. + +This method is not meant for production applications. It is meant to be a development utility to quickly clear +extent physical data.

+ @param db represented as com.intersys.objects.Database + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method %KillExtent + */ + public static void sys_KillExtent (com.intersys.objects.Database db) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[0]; + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%KillExtent",args,com.intersys.objects.Database.RET_PRIM); + db.parseStatus(res); + return; + } + /** +

Runs method %SaveIndices in Cache.

+

Description: Files the indices for all objects whose ID is in the range defined by pStartId and pEndId. +If pEndId is null then it defaults to pStartId. If pStartId is null then the +range is empty and no filing will occur. + +If lockExtent is true then an extent lock will be acquired before the indices +are built. If the lock cannot be acquired then an error is returned. The lock is released +after the index filing is completed. + + +

Returns a %Status value indicating success or failure.

+ @param db represented as com.intersys.objects.Database + default argument pStartId set to "" + default argument pEndId set to "" + default argument lockExtent set to 0 + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see #sys_SaveIndices(com.intersys.objects.Database,java.lang.String,java.lang.String,java.lang.Boolean) + @see Method %SaveIndices + */ + public static void sys_SaveIndices (com.intersys.objects.Database db) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[0]; + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%SaveIndices",args,com.intersys.objects.Database.RET_PRIM); + db.parseStatus(res); + return; + } + /** +

Runs method %SaveIndices in Cache.

+

Description: Files the indices for all objects whose ID is in the range defined by pStartId and pEndId. +If pEndId is null then it defaults to pStartId. If pStartId is null then the +range is empty and no filing will occur. + +If lockExtent is true then an extent lock will be acquired before the indices +are built. If the lock cannot be acquired then an error is returned. The lock is released +after the index filing is completed. + + +

Returns a %Status value indicating success or failure.

+ @param db represented as com.intersys.objects.Database + @param pStartId represented as java.lang.String + default argument pEndId set to "" + default argument lockExtent set to 0 + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see #sys_SaveIndices(com.intersys.objects.Database,java.lang.String,java.lang.String,java.lang.Boolean) + @see Method %SaveIndices + */ + public static void sys_SaveIndices (com.intersys.objects.Database db, java.lang.String pStartId) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(pStartId); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%SaveIndices",args,com.intersys.objects.Database.RET_PRIM); + db.parseStatus(res); + return; + } + /** +

Runs method %SaveIndices in Cache.

+

Description: Files the indices for all objects whose ID is in the range defined by pStartId and pEndId. +If pEndId is null then it defaults to pStartId. If pStartId is null then the +range is empty and no filing will occur. + +If lockExtent is true then an extent lock will be acquired before the indices +are built. If the lock cannot be acquired then an error is returned. The lock is released +after the index filing is completed. + + +

Returns a %Status value indicating success or failure.

+ @param db represented as com.intersys.objects.Database + @param pStartId represented as java.lang.String + @param pEndId represented as java.lang.String + default argument lockExtent set to 0 + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see #sys_SaveIndices(com.intersys.objects.Database,java.lang.String,java.lang.String,java.lang.Boolean) + @see Method %SaveIndices + */ + public static void sys_SaveIndices (com.intersys.objects.Database db, java.lang.String pStartId, java.lang.String pEndId) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[2]; + args[0] = new com.intersys.cache.Dataholder(pStartId); + args[1] = new com.intersys.cache.Dataholder(pEndId); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%SaveIndices",args,com.intersys.objects.Database.RET_PRIM); + db.parseStatus(res); + return; + } + /** +

Runs method %SaveIndices in Cache.

+

Description: Files the indices for all objects whose ID is in the range defined by pStartId and pEndId. +If pEndId is null then it defaults to pStartId. If pStartId is null then the +range is empty and no filing will occur. + +If lockExtent is true then an extent lock will be acquired before the indices +are built. If the lock cannot be acquired then an error is returned. The lock is released +after the index filing is completed. + + +

Returns a %Status value indicating success or failure.

+ @param db represented as com.intersys.objects.Database + @param pStartId represented as java.lang.String + @param pEndId represented as java.lang.String + @param lockExtent represented as java.lang.Boolean + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method %SaveIndices + */ + public static void sys_SaveIndices (com.intersys.objects.Database db, java.lang.String pStartId, java.lang.String pEndId, java.lang.Boolean lockExtent) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[3]; + args[0] = new com.intersys.cache.Dataholder(pStartId); + args[1] = new com.intersys.cache.Dataholder(pEndId); + args[2] = new com.intersys.cache.Dataholder(lockExtent); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"%SaveIndices",args,com.intersys.objects.Database.RET_PRIM); + db.parseStatus(res); + return; + } + /** +

Runs method CreateBook in Cache.

+ @param db represented as com.intersys.objects.Database + @param tags represented as java.util.List + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method CreateBook + */ + public static void CreateBook (com.intersys.objects.Database db, java.util.List tags) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(tags); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"CreateBook",args,com.intersys.objects.Database.RET_NONE); + return; + } + /** +

Runs method IDKEYDelete in Cache.

+ @param db represented as com.intersys.objects.Database + @param K1 represented as java.lang.String + default argument concurrency set to -1 + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see #IDKEYDelete(com.intersys.objects.Database,java.lang.String,java.lang.Integer) + @see Method IDKEYDelete + */ + public static void IDKEYDelete (com.intersys.objects.Database db, java.lang.String K1) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(K1); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"IDKEYDelete",args,com.intersys.objects.Database.RET_PRIM); + db.parseStatus(res); + return; + } + /** +

Runs method IDKEYDelete in Cache.

+ @param db represented as com.intersys.objects.Database + @param K1 represented as java.lang.String + @param concurrency represented as java.lang.Integer + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method IDKEYDelete + */ + public static void IDKEYDelete (com.intersys.objects.Database db, java.lang.String K1, java.lang.Integer concurrency) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[2]; + args[0] = new com.intersys.cache.Dataholder(K1); + args[1] = new com.intersys.cache.Dataholder(concurrency); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"IDKEYDelete",args,com.intersys.objects.Database.RET_PRIM); + db.parseStatus(res); + return; + } + /** +

Runs method IDKEYExists in Cache.

+ @param db represented as com.intersys.objects.Database + @param K1 represented as java.lang.String + default argument id set to "" + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see #IDKEYExists(com.intersys.objects.Database,java.lang.String,com.intersys.objects.StringHolder) + @see Method IDKEYExists + */ + public static java.lang.Boolean IDKEYExists (com.intersys.objects.Database db, java.lang.String K1) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(K1); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"IDKEYExists",args,com.intersys.objects.Database.RET_PRIM); + return res.getBoolean(); + } + /** +

Runs method IDKEYExists in Cache.

+ @param db represented as com.intersys.objects.Database + @param K1 represented as java.lang.String + @param id represented as com.intersys.objects.StringHolder + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method IDKEYExists + */ + public static java.lang.Boolean IDKEYExists (com.intersys.objects.Database db, java.lang.String K1, com.intersys.objects.StringHolder id) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[2]; + int[] _refs = new int[1]; + args[0] = new com.intersys.cache.Dataholder(K1); + args[1] = com.intersys.cache.Dataholder.create (id.value); + _refs[0] = 2; + com.intersys.cache.Dataholder[] res=db.runClassMethod(CACHE_CLASS_NAME,"IDKEYExists",_refs,args,com.intersys.objects.Database.RET_PRIM); + id.set(res[1].getString()); + return res[0].getBoolean(); + } + /** +

Runs method IDKEYOpen in Cache.

+ @param db represented as com.intersys.objects.Database + @param K1 represented as java.lang.String + default argument concurrency set to -1 + default argument sc set to $$$OK + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see #IDKEYOpen(com.intersys.objects.Database,java.lang.String,java.lang.Integer,com.intersys.objects.StatusCodeHolder) + @see Method IDKEYOpen + */ + public static koorong.Book IDKEYOpen (com.intersys.objects.Database db, java.lang.String K1) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(K1); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"IDKEYOpen",args,com.intersys.objects.Database.RET_OBJECT); + com.intersys.cache.CacheObject cobj = res.getCacheObject(); + if (cobj == null) + return null; + return (koorong.Book)(cobj.newJavaInstance()); + } + /** +

Runs method IDKEYOpen in Cache.

+ @param db represented as com.intersys.objects.Database + @param K1 represented as java.lang.String + @param concurrency represented as java.lang.Integer + default argument sc set to $$$OK + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see #IDKEYOpen(com.intersys.objects.Database,java.lang.String,java.lang.Integer,com.intersys.objects.StatusCodeHolder) + @see Method IDKEYOpen + */ + public static koorong.Book IDKEYOpen (com.intersys.objects.Database db, java.lang.String K1, java.lang.Integer concurrency) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[2]; + args[0] = new com.intersys.cache.Dataholder(K1); + args[1] = new com.intersys.cache.Dataholder(concurrency); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"IDKEYOpen",args,com.intersys.objects.Database.RET_OBJECT); + com.intersys.cache.CacheObject cobj = res.getCacheObject(); + if (cobj == null) + return null; + return (koorong.Book)(cobj.newJavaInstance()); + } + /** +

Runs method IDKEYOpen in Cache.

+ @param db represented as com.intersys.objects.Database + @param K1 represented as java.lang.String + @param concurrency represented as java.lang.Integer + @param sc represented as com.intersys.objects.StatusCodeHolder + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method IDKEYOpen + */ + public static koorong.Book IDKEYOpen (com.intersys.objects.Database db, java.lang.String K1, java.lang.Integer concurrency, com.intersys.objects.StatusCodeHolder sc) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[3]; + int[] _refs = new int[1]; + args[0] = new com.intersys.cache.Dataholder(K1); + args[1] = new com.intersys.cache.Dataholder(concurrency); + args[2] = com.intersys.cache.Dataholder.create (sc.value); + _refs[0] = 3; + com.intersys.cache.Dataholder[] res=db.runClassMethod(CACHE_CLASS_NAME,"IDKEYOpen",_refs,args,com.intersys.objects.Database.RET_OBJECT); + sc.set(res[1].getStatusCode()); + com.intersys.cache.CacheObject cobj = res[0].getCacheObject(); + if (cobj == null) + return null; + return (koorong.Book)(cobj.newJavaInstance()); + } + /** +

Runs method TagsGetObject in Cache.

+ default argument force set to 0 + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see #TagsGetObject(java.lang.Integer) + @see Method TagsGetObject + */ + public com.intersys.objects.Oid TagsGetObject () throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[0]; + com.intersys.cache.Dataholder res=mInternal.runInstanceMethod("TagsGetObject",args,com.intersys.objects.Database.RET_PRIM); + return res.getOid(); + } + /** +

Runs method TagsGetObject in Cache.

+ @param force represented as java.lang.Integer + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method TagsGetObject + */ + public com.intersys.objects.Oid TagsGetObject (java.lang.Integer force) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(force); + com.intersys.cache.Dataholder res=mInternal.runInstanceMethod("TagsGetObject",args,com.intersys.objects.Database.RET_PRIM); + return res.getOid(); + } + /** +

Runs method TagsGetObjectId in Cache.

+ default argument force set to 0 + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see #TagsGetObjectId(java.lang.Integer) + @see Method TagsGetObjectId + */ + public java.lang.String TagsGetObjectId () throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[0]; + com.intersys.cache.Dataholder res=mInternal.runInstanceMethod("TagsGetObjectId",args,com.intersys.objects.Database.RET_PRIM); + return res.getString(); + } + /** +

Runs method TagsGetObjectId in Cache.

+ @param force represented as java.lang.Integer + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method TagsGetObjectId + */ + public java.lang.String TagsGetObjectId (java.lang.Integer force) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(force); + com.intersys.cache.Dataholder res=mInternal.runInstanceMethod("TagsGetObjectId",args,com.intersys.objects.Database.RET_PRIM); + return res.getString(); + } + /** +

Runs method TagsIsValid in Cache.

+ @param db represented as com.intersys.objects.Database + @param value represented as java.lang.String + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method TagsIsValid + */ + public static void TagsIsValid (com.intersys.objects.Database db, java.lang.String value) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(value); + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"TagsIsValid",args,com.intersys.objects.Database.RET_PRIM); + db.parseStatus(res); + return; + } + /** +

Runs method TagsSetObject in Cache.

+ @param newvalue represented as com.intersys.objects.Oid + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method TagsSetObject + */ + public void TagsSetObject (com.intersys.objects.Oid newvalue) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(newvalue); + com.intersys.cache.Dataholder res=mInternal.runInstanceMethod("TagsSetObject",args,com.intersys.objects.Database.RET_PRIM); + getDatabase().parseStatus(res); + return; + } + /** +

Runs method TagsSetObjectId in Cache.

+ @param newid represented as java.lang.String + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method TagsSetObjectId + */ + public void TagsSetObjectId (java.lang.String newid) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[1]; + args[0] = new com.intersys.cache.Dataholder(newid); + com.intersys.cache.Dataholder res=mInternal.runInstanceMethod("TagsSetObjectId",args,com.intersys.objects.Database.RET_PRIM); + getDatabase().parseStatus(res); + return; + } + /** +

Runs method Test in Cache.

+ @param db represented as com.intersys.objects.Database + @throws com.intersys.objects.CacheException if any error occured while running the method. + @see Method Test + */ + public static void Test (com.intersys.objects.Database db) throws com.intersys.objects.CacheException { + com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[0]; + com.intersys.cache.Dataholder res=db.runClassMethod(CACHE_CLASS_NAME,"Test",args,com.intersys.objects.Database.RET_NONE); + return; + } + /** +

Returns a CallableStatement for query Extent.

+ @param db represented as com.intersys.objects.Database + @throws com.intersys.objects.CacheException if any error occured while running the method. + */ + public static com.intersys.objects.CacheQuery query_Extent (com.intersys.objects.Database db) throws com.intersys.objects.CacheException { + return new com.intersys.objects.CacheQuery(db, "koorong.Book_Extent", 0, 0); + } + + public static Object addToBatchInsert (Object batch, java.sql.Connection con) throws java.sql.SQLException { + if (batch == null) { + com.intersys.jdbc.CacheConnection c = null; + if (con != null) { + try { + c = com.intersys.cache.jdbcutil.JDBCAdapter.getCacheConnection (con); + } catch (com.intersys.objects.CacheException x) { + throw new java.sql.SQLException ("Connection is not a CacheConnection."); + } + } + batch = new com.intersys.jdbc.QuickStatement.Batch (c.getConnectionInfo ()); + } + com.intersys.jdbc.QuickStatement.Batch qbatch = (com.intersys.jdbc.QuickStatement.Batch) batch; + com.intersys.jdbc.SysListProxy.setInteger (qbatch.list, 2); // number of columns + com.intersys.jdbc.SysListProxy.setUndefined(qbatch.list); // for Tags + com.intersys.jdbc.SysListProxy.setUndefined(qbatch.list); // for x__classname + qbatch.flushRecord (); + return qbatch; + } + + public static java.util.List executeBatchInsert (java.sql.Connection con, Object batch, int nolock) throws java.sql.SQLException { + Object ids = com.intersys.jdbc.QuickStatement.Batch.execute ("koorong", "Book", 4, batch, con, nolock); + return new com.intersys.objects.SList (ids); + } +}