Sample
Class Company

java.lang.Object
  extended bycom.intersys.classes.CacheGeneric
      extended bycom.intersys.classes.CacheRootObject
          extended bycom.intersys.classes.RegisteredObject
              extended bycom.intersys.classes.Persistent
                  extended bySample.Company
All Implemented Interfaces:
ObjectHandle, java.io.Serializable

public class Company
extends Persistent

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.intersys.classes.CacheRootObject
mInternal
 
Constructor Summary
Company(CacheObject ref)
          NB: DO NOT USE IN APPLICATION(!!!).
Company(Database db)
          Creates a new instance of object "Company" in Cache database and corresponding object of class Company.
Company(Database db, java.lang.String initstr)
           
 
Method Summary
static void _deleteId(Database db, Id id)
          Runs method %Delete in Cache to delete an object from Cache database.
static void _deleteId(Database db, Id id, int concurrency)
          Runs method %Delete in Cache to delete an object from Cache database.
static java.lang.Boolean _existsId(Database db, Id id)
          Runs method %Exists in Cache to see if an object exists.
static RegisteredObject _open(Database db, Id id)
          Runs method %OpenId in Cache to open an object from Cache database and creates corresponding object of class Company.
static RegisteredObject _open(Database db, Id id, int concurrency)
          Runs method %OpenId in Cache to open an object from Cache database and creates corresponding object of class Company.
static RegisteredObject _open(Database db, Oid oid)
          Runs method %Open in Cache to open an object from Cache database and creates corresponding object of class Company.
static RegisteredObject _open(Database db, Oid oid, int concurrency)
          Runs method %Open in Cache to open an object from Cache database and creates corresponding object of class Company.
static java.lang.Object addToBatchInsert(java.lang.Object batch, java.sql.Connection con, java.lang.String Mission, java.lang.String Name, java.lang.Integer Revenue, java.lang.String TaxID)
           
static void checkAllFieldsValid(Database db)
          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.
static void checkAllMethods(Database db)
          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.
static void checkEmployeesValid(Database db)
          Verifies that indexes for property Employees in zObjVal are the same as in Cache.
static void checkMissionValid(Database db)
          Verifies that indexes for property Mission in zObjVal are the same as in Cache.
static void checkNameValid(Database db)
          Verifies that indexes for property Name in zObjVal are the same as in Cache.
static void checkRevenueValid(Database db)
          Verifies that indexes for property Revenue in zObjVal are the same as in Cache.
static void checkTaxIDValid(Database db)
          Verifies that indexes for property TaxID in zObjVal are the same as in Cache.
static void delete(Database db, Id id)
          Runs method %Delete in Cache to delete an object from Cache database.
static void delete(Database db, Id id, int concurrency)
          Runs method %Delete in Cache to delete an object from Cache database.
static java.util.List executeBatchInsert(java.sql.Connection con, java.lang.Object batch, int nolock)
           
static boolean exists(Database db, Id id)
          Runs method %Exists in Cache to see if an object exists.
static boolean exists(Database db, Oid oid)
          Runs method %Exists in Cache to see if an object exists.
 CacheClass getCacheClass()
          Allows access metadata information about type of this object in Cache database.
static java.lang.String getCacheClassName()
          Returns class name of the class Company as it is in Cache Database.
 RelationshipObject getEmployees()
          Returns value of property Employees.
 java.lang.String getMission()
          Returns value of property Mission.
 java.lang.String getName()
          Returns value of property Name.
 java.lang.Integer getRevenue()
          Returns value of property Revenue.
 java.lang.String getTaxID()
          Returns value of property TaxID.
 java.lang.Boolean NameIdxExists(java.lang.String K1)
          Runs method NameIdxExists in Cache.
 void OnPopulate()
          Runs method OnPopulate in Cache.
static java.lang.Integer Populate(Database db)
          Runs method Populate in Cache.
static java.lang.Integer Populate(Database db, java.lang.Integer count)
          Runs method Populate in Cache.
static java.lang.Integer Populate(Database db, java.lang.Integer count, java.lang.Integer verbose)
          Runs method Populate in Cache.
static java.lang.Integer Populate(Database db, java.lang.Integer count, java.lang.Integer verbose, java.lang.Integer DeferIndices)
          Runs method Populate in Cache.
static java.lang.Integer Populate(Database db, java.lang.Integer count, java.lang.Integer verbose, java.lang.Integer DeferIndices, IntegerHolder objects)
          Runs method Populate in Cache.
static java.lang.String PopulateSerial(Database db)
          Runs method PopulateSerial in Cache.
 void PrintPayroll()
          Runs method PrintPayroll in Cache.
static CacheQuery query_Extent(Database db)
          Returns a CallableStatement for query Extent.
 void setEmployees(RelationshipObject value)
          Sets new value for Employees.
 void setMission(java.lang.String value)
          Sets new value for Mission.
 void setName(java.lang.String value)
          Sets new value for Name.
 void setRevenue(java.lang.Integer value)
          Sets new value for Revenue.
 void setTaxID(java.lang.String value)
          Sets new value for TaxID.
static java.lang.Boolean sys_BMEBuilt(Database db, StringHolder bmeName)
          Runs method sys_BMEBuilt in Cache.
static void sys_BuildIndices(Database db)
          Runs method sys_BuildIndices in Cache.
static void sys_BuildIndices(Database db, SList idxlist)
          Runs method sys_BuildIndices in Cache.
static void sys_CheckUnique(Database db)
          Runs method sys_CheckUnique in Cache.
static void sys_CheckUnique(Database db, SList idxlist)
          Runs method sys_CheckUnique in Cache.
static java.lang.String sys_ClassName(Database db, java.lang.Boolean fullname)
          Runs method sys_ClassName in Cache.
static void sys_Delete(Database db)
          Runs method sys_Delete in Cache.
static void sys_Delete(Database db, Oid oid)
          Runs method sys_Delete in Cache.
static void sys_Delete(Database db, Oid oid, java.lang.Integer concurrency)
          Runs method sys_Delete in Cache.
static void sys_DeleteExtent(Database db, java.lang.Integer concurrency, StringHolder deletecount, StringHolder instancecount)
          Runs method sys_DeleteExtent in Cache.
static void sys_DeleteId(Database db, java.lang.String id)
          Runs method sys_DeleteId in Cache.
static void sys_DeleteId(Database db, java.lang.String id, java.lang.Integer concurrency)
          Runs method sys_DeleteId in Cache.
static java.lang.Boolean sys_Exists(Database db)
          Runs method sys_Exists in Cache.
static java.lang.Boolean sys_Exists(Database db, Oid oid)
          Runs method sys_Exists in Cache.
static java.lang.Boolean sys_ExistsId(Database db, java.lang.String id)
          Runs method sys_ExistsId in Cache.
static java.lang.Integer sys_Extends(Database db, java.lang.String isclass)
          Runs method sys_Extends in Cache.
static java.lang.String sys_GetParameter(Database db)
          Runs method sys_GetParameter in Cache.
static java.lang.String sys_GetParameter(Database db, java.lang.String paramname)
          Runs method sys_GetParameter in Cache.
static java.lang.Integer sys_IsA(Database db, java.lang.String isclass)
          Runs method sys_IsA in Cache.
static void sys_KillExtent(Database db)
          Runs method sys_KillExtent in Cache.
static java.lang.String sys_PackageName(Database db)
          Runs method sys_PackageName in Cache.
static void sys_PurgeIndices(Database db)
          Runs method sys_PurgeIndices in Cache.
static void sys_PurgeIndices(Database db, SList idxlist)
          Runs method sys_PurgeIndices in Cache.
static void sys_SortBegin(Database db)
          Runs method sys_SortBegin in Cache.
static void sys_SortBegin(Database db, SList idxlist)
          Runs method sys_SortBegin in Cache.
static void sys_SortBegin(Database db, SList idxlist, java.lang.Integer excludeunique)
          Runs method sys_SortBegin in Cache.
static void sys_SortEnd(Database db)
          Runs method sys_SortEnd in Cache.
static void sys_SortEnd(Database db, SList idxlist)
          Runs method sys_SortEnd in Cache.
static void sys_SortEnd(Database db, SList idxlist, java.lang.Integer commit)
          Runs method sys_SortEnd in Cache.
 java.lang.Boolean TaxIDIdxExists(java.lang.String K1)
          Runs method TaxIDIdxExists in Cache.
 
Methods inherited from class com.intersys.classes.Persistent
_buildIndices, _buildIndices, _delete, _delete, _downgradeConcurrency, _downgradeConcurrency, _exists, _id, _oid, _reload, _save, _upgradeConcurrency, _upgradeConcurrency, delete, delete, exists, getId, getOid, JournalObject, JournalObject, save, save
 
Methods inherited from class com.intersys.classes.RegisteredObject
_className, _className, _constructClone, _constructClone, _constructClone, _isA, _isModified, _normalizeObject, _packageName, _validateObject, _validateObject, constructClone, constructClone, getZRef
 
Methods inherited from class com.intersys.classes.CacheRootObject
_close, castTo, changeInternal, equals, finalize, getDatabase, getField, getOref, getProxy, getString, getUserData, hashCode, release, releaseInternal, setUserData, toString
 
Methods inherited from class com.intersys.classes.CacheGeneric
checkAllFieldsValid, checkAllMethods, checkFieldsLimited, checkZobjValid, reset
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Company

public Company(CacheObject ref)
        throws CacheException

NB: DO NOT USE IN APPLICATION(!!!).
Use Company._open instead!

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

See Also:
_open(com.intersys.objects.Database, com.intersys.objects.Oid)

Company

public Company(Database db,
               java.lang.String initstr)
        throws CacheException

Company

public Company(Database db)
        throws CacheException
Creates a new instance of object "Company" in Cache database and corresponding object of class Company.

Parameters:
db - Database object used for connection with Cache database.
Throws:
CacheException - in case of error.
See Also:
_open(com.intersys.objects.Database, com.intersys.objects.Oid)
Method Detail

_open

public static RegisteredObject _open(Database db,
                                     Id id)
                              throws CacheException
Runs method %OpenId in Cache to open an object from Cache database and creates corresponding object of class Company.

Parameters:
db - Database object used for connection with Cache database.
id - ID as specified in Cache represented as Id.
Returns:
RegisteredObject , corresponding to opened object. This object may be of Company or of any of its subclasses. Cast to Company is guaranteed to pass without ClassCastException exception.
Throws:
CacheException - in case of error.
See Also:
ClassCastException, _open(com.intersys.objects.Database, com.intersys.objects.Oid), Company(com.intersys.objects.Database)

_open

public static RegisteredObject _open(Database db,
                                     Id id,
                                     int concurrency)
                              throws CacheException
Runs method %OpenId in Cache to open an object from Cache database and creates corresponding object of class Company.

Parameters:
db - Database object used for connection with Cache database.
id - ID as specified in Cache represented as Id.
concurrency - Concurrency level. represented as Concurrency. Here are concurrency values, see Object Concurrency Options in your on-line Cache' documentation for more information.
Returns:
RegisteredObject , corresponding to opened object. This object may be of Company or of any of its subclasses. Cast to Company is guaranteed to pass without ClassCastException exception.
Throws:
CacheException - in case of error.
See Also:
Object Concurrency Options.
Object Concurrency Options
0 No locking, no locks are used
1 Atomic
2 Shared
3 Shared/Retained
4 Exclusive
, ClassCastException, _open(com.intersys.objects.Database, com.intersys.objects.Oid), Company(com.intersys.objects.Database)

_open

public static RegisteredObject _open(Database db,
                                     Oid oid)
                              throws CacheException
Runs method %Open in Cache to open an object from Cache database and creates corresponding object of class Company.

Parameters:
db - Database object used for connection with Cache database.
oid - Object ID as specified in Cache. represented as Oid.
Returns:
RegisteredObject , corresponding to opened object. This object may be of Company or of any of its subclasses. Cast to Company is guaranteed to pass without ClassCastException exception.
Throws:
CacheException - in case of error.
See Also:
ClassCastException, _open(com.intersys.objects.Database, com.intersys.objects.Oid), Company(com.intersys.objects.Database)

_open

public static RegisteredObject _open(Database db,
                                     Oid oid,
                                     int concurrency)
                              throws CacheException
Runs method %Open in Cache to open an object from Cache database and creates corresponding object of class Company.

Parameters:
db - Database object used for connection with Cache database.
oid - Object ID as specified in Cache. represented as Oid.
concurrency - Concurrency level. represented as Concurrency. Here are concurrency values, see Object Concurrency Options in your on-line Cache' documentation for more information.
Returns:
RegisteredObject , corresponding to opened object. This object may be of Company or of any of its subclasses. Cast to Company is guaranteed to pass without ClassCastException exception.
Throws:
CacheException - in case of error.
See Also:
Object Concurrency Options.
Object Concurrency Options
0 No locking, no locks are used
1 Atomic
2 Shared
3 Shared/Retained
4 Exclusive
, ClassCastException, _open(com.intersys.objects.Database, com.intersys.objects.Oid), Company(com.intersys.objects.Database)

delete

public static void delete(Database db,
                          Id id)
                   throws CacheException
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.

Parameters:
db - Database object used for connection with Cache database.
id - ID as specified in Cache represented as Id.
Throws:
CacheException - in case of error.
See Also:
ClassCastException, _open(com.intersys.objects.Database, com.intersys.objects.Id), Company(com.intersys.objects.Database)

delete

public static void delete(Database db,
                          Id id,
                          int concurrency)
                   throws CacheException
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.

Parameters:
db - Database object used for connection with Cache database.
id - ID as specified in Cache represented as Id.
concurrency - Concurrency level. represented as Concurrency. Here are concurrency values, see Object Concurrency Options in your on-line Cache' documentation for more information.
Throws:
CacheException - in case of error.
See Also:
Object Concurrency Options.
Object Concurrency Options
0 No locking, no locks are used
1 Atomic
2 Shared
3 Shared/Retained
4 Exclusive
, ClassCastException, _open(com.intersys.objects.Database, com.intersys.objects.Id), Company(com.intersys.objects.Database)

_deleteId

public static void _deleteId(Database db,
                             Id id)
                      throws CacheException
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.

Parameters:
db - Database object used for connection with Cache database.
id - ID as specified in Cache represented as Id.
Throws:
CacheException - in case of error.
See Also:
ClassCastException, _open(com.intersys.objects.Database, com.intersys.objects.Id), Company(com.intersys.objects.Database)

_deleteId

public static void _deleteId(Database db,
                             Id id,
                             int concurrency)
                      throws CacheException
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.

Parameters:
db - Database object used for connection with Cache database.
id - ID as specified in Cache represented as Id.
concurrency - Concurrency level. represented as Concurrency. Here are concurrency values, see Object Concurrency Options in your on-line Cache' documentation for more information.
Throws:
CacheException - in case of error.
See Also:
Object Concurrency Options.
Object Concurrency Options
0 No locking, no locks are used
1 Atomic
2 Shared
3 Shared/Retained
4 Exclusive
, ClassCastException, _open(com.intersys.objects.Database, com.intersys.objects.Id), Company(com.intersys.objects.Database)

exists

public static boolean exists(Database db,
                             Id id)
                      throws CacheException
Runs method %Exists in Cache to see if an object exists.

Parameters:
db - Database object used for connection with Cache database.
id - ID as specified in Cache represented as Id.
Throws:
CacheException - in case of error.
See Also:
ClassCastException, _existsId(com.intersys.objects.Database, com.intersys.objects.Id), Company(com.intersys.objects.Database)

_existsId

public static java.lang.Boolean _existsId(Database db,
                                          Id id)
                                   throws CacheException
Runs method %Exists in Cache to see if an object exists.

Parameters:
db - Database object used for connection with Cache database.
id - ID as specified in Cache represented as Id.
Throws:
CacheException - in case of error.
See Also:
ClassCastException, _existsId(com.intersys.objects.Database, com.intersys.objects.Id), Company(com.intersys.objects.Database)

getCacheClassName

public static java.lang.String getCacheClassName()
Returns class name of the class Company as it is in Cache Database. Note, that this is a static method, so no object specific information can be returned. Use getCacheClass().geName() to get the class name for specific object.

Returns:
Cache class name as a String
See Also:
getCacheClass(), CacheClass.getName()

getCacheClass

public CacheClass getCacheClass()
                         throws CacheException
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).

Returns:
CacheClass object for this object type.
Throws:
CacheException

checkAllFieldsValid

public static void checkAllFieldsValid(Database db)
                                throws CacheException
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

Parameters:
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:
InvalidClassException - if any inconsistency is found.
CacheException - if any error occurred during verification, e.g. communication error with Database.
See Also:
InvalidPropertyException

exists

public static boolean exists(Database db,
                             Oid oid)
                      throws CacheException
Runs method %Exists in Cache to see if an object exists.

Parameters:
db - Database object used for connection with Cache database.
oid - Object ID as specified in Cache. represented as Oid.
Returns:
RegisteredObject , corresponding to opened object. This object may be of Company or of any of its subclasses. Cast to Company is guaranteed to pass without ClassCastException exception.
Throws:
CacheException - in case of error.
See Also:
ClassCastException, _open(com.intersys.objects.Database, com.intersys.objects.Oid), Company(com.intersys.objects.Database)

checkAllMethods

public static void checkAllMethods(Database db)
                            throws CacheException
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

Parameters:
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:
InvalidClassException - if any inconsistency is found.
CacheException - if any error occurred during verification, e.g. communication error with Database.
See Also:
InvalidPropertyException

checkEmployeesValid

public static void checkEmployeesValid(Database db)
                                throws CacheException
Verifies that indexes for property Employees in zObjVal are the same as in Cache. It does not return anything but it throws an exception in case of inconsistency.

Please note, that if there is any inconsistency in zObjVal indexes this is fatal and class can not work correctly and must be regenerated.

Parameters:
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:
InvalidClassException - if any inconsistency is found.
CacheException - if any error occurred during verification, e.g. communication error with Database.
See Also:
checkAllFieldsValid(com.intersys.objects.Database)

getEmployees

public RelationshipObject getEmployees()
                                throws CacheException
Returns value of property Employees.

Description: The Employee objects associated with this Company.

Returns:
current value of Employees represented as RelationshipObject
Throws:
CacheException - if any error occurred during value retrieval.
See Also:
Employees

setEmployees

public void setEmployees(RelationshipObject value)
                  throws CacheException
Sets new value for Employees.

Description: The Employee objects associated with this Company.

Parameters:
value - new value to be set represented as RelationshipObject.
Throws:
CacheException - if any error occurred during value setting.
See Also:
Employees

checkMissionValid

public static void checkMissionValid(Database db)
                              throws CacheException
Verifies that indexes for property Mission in zObjVal are the same as in Cache. It does not return anything but it throws an exception in case of inconsistency.

Please note, that if there is any inconsistency in zObjVal indexes this is fatal and class can not work correctly and must be regenerated.

Parameters:
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:
InvalidClassException - if any inconsistency is found.
CacheException - if any error occurred during verification, e.g. communication error with Database.
See Also:
checkAllFieldsValid(com.intersys.objects.Database)

getMission

public java.lang.String getMission()
                            throws CacheException
Returns value of property Mission.

Description: The company's mission statement.

Returns:
current value of Mission represented as java.lang.String
Throws:
CacheException - if any error occurred during value retrieval.
See Also:
Mission

setMission

public void setMission(java.lang.String value)
                throws CacheException
Sets new value for Mission.

Description: The company's mission statement.

Parameters:
value - new value to be set represented as java.lang.String.
Throws:
CacheException - if any error occurred during value setting.
See Also:
Mission

checkNameValid

public static void checkNameValid(Database db)
                           throws CacheException
Verifies that indexes for property Name in zObjVal are the same as in Cache. It does not return anything but it throws an exception in case of inconsistency.

Please note, that if there is any inconsistency in zObjVal indexes this is fatal and class can not work correctly and must be regenerated.

Parameters:
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:
InvalidClassException - if any inconsistency is found.
CacheException - if any error occurred during verification, e.g. communication error with Database.
See Also:
checkAllFieldsValid(com.intersys.objects.Database)

getName

public java.lang.String getName()
                         throws CacheException
Returns value of property Name.

Description: The company's name.

Returns:
current value of Name represented as java.lang.String
Throws:
CacheException - if any error occurred during value retrieval.
See Also:
Name

setName

public void setName(java.lang.String value)
             throws CacheException
Sets new value for Name.

Description: The company's name.

Parameters:
value - new value to be set represented as java.lang.String.
Throws:
CacheException - if any error occurred during value setting.
See Also:
Name

checkRevenueValid

public static void checkRevenueValid(Database db)
                              throws CacheException
Verifies that indexes for property Revenue in zObjVal are the same as in Cache. It does not return anything but it throws an exception in case of inconsistency.

Please note, that if there is any inconsistency in zObjVal indexes this is fatal and class can not work correctly and must be regenerated.

Parameters:
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:
InvalidClassException - if any inconsistency is found.
CacheException - if any error occurred during verification, e.g. communication error with Database.
See Also:
checkAllFieldsValid(com.intersys.objects.Database)

getRevenue

public java.lang.Integer getRevenue()
                             throws CacheException
Returns value of property Revenue.

Description: The last reported revenue for the company.

Returns:
current value of Revenue represented as java.lang.Integer
Throws:
CacheException - if any error occurred during value retrieval.
See Also:
Revenue

setRevenue

public void setRevenue(java.lang.Integer value)
                throws CacheException
Sets new value for Revenue.

Description: The last reported revenue for the company.

Parameters:
value - new value to be set represented as java.lang.Integer.
Throws:
CacheException - if any error occurred during value setting.
See Also:
Revenue

checkTaxIDValid

public static void checkTaxIDValid(Database db)
                            throws CacheException
Verifies that indexes for property TaxID in zObjVal are the same as in Cache. It does not return anything but it throws an exception in case of inconsistency.

Please note, that if there is any inconsistency in zObjVal indexes this is fatal and class can not work correctly and must be regenerated.

Parameters:
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:
InvalidClassException - if any inconsistency is found.
CacheException - if any error occurred during verification, e.g. communication error with Database.
See Also:
checkAllFieldsValid(com.intersys.objects.Database)

getTaxID

public java.lang.String getTaxID()
                          throws CacheException
Returns value of property TaxID.

Description: The unique Tax ID number for the company.

Returns:
current value of TaxID represented as java.lang.String
Throws:
CacheException - if any error occurred during value retrieval.
See Also:
TaxID

setTaxID

public void setTaxID(java.lang.String value)
              throws CacheException
Sets new value for TaxID.

Description: The unique Tax ID number for the company.

Parameters:
value - new value to be set represented as java.lang.String.
Throws:
CacheException - if any error occurred during value setting.
See Also:
TaxID

sys_BMEBuilt

public static java.lang.Boolean sys_BMEBuilt(Database db,
                                             StringHolder bmeName)
                                      throws CacheException

Runs method sys_BMEBuilt in Cache.

Parameters:
db - represented as Database
bmeName - represented as com.intersys.objects.StringHolder
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %BMEBuilt

sys_BuildIndices

public static void sys_BuildIndices(Database db)
                             throws CacheException

Runs method sys_BuildIndices in Cache.

Parameters:
db - represented as Database default argument idxlist set to ""
Throws:
CacheException - if any error occured while running the method.
See Also:
sys_BuildIndices(Database,com.intersys.objects.SList), Method %BuildIndices

sys_BuildIndices

public static void sys_BuildIndices(Database db,
                                    SList idxlist)
                             throws CacheException

Runs method sys_BuildIndices in Cache.

Parameters:
db - represented as Database
idxlist - represented as com.intersys.objects.SList
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %BuildIndices

sys_CheckUnique

public static void sys_CheckUnique(Database db)
                            throws CacheException

Runs method sys_CheckUnique in Cache.

Parameters:
db - represented as Database default argument idxlist set to ""
Throws:
CacheException - if any error occured while running the method.
See Also:
sys_CheckUnique(Database,com.intersys.objects.SList), Method %CheckUnique

sys_CheckUnique

public static void sys_CheckUnique(Database db,
                                   SList idxlist)
                            throws CacheException

Runs method sys_CheckUnique in Cache.

Parameters:
db - represented as Database
idxlist - represented as com.intersys.objects.SList
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %CheckUnique

sys_ClassName

public static java.lang.String sys_ClassName(Database db,
                                             java.lang.Boolean fullname)
                                      throws CacheException

Runs method sys_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.

Parameters:
db - represented as Database
fullname - represented as java.lang.Boolean
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %ClassName

sys_Delete

public static void sys_Delete(Database db)
                       throws CacheException

Runs method sys_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.

Parameters:
db - represented as Database default argument oid set to "" default argument concurrency set to -1
Throws:
CacheException - if any error occured while running the method.
See Also:
sys_Delete(Database,com.intersys.objects.Oid,java.lang.Integer), Method %Delete

sys_Delete

public static void sys_Delete(Database db,
                              Oid oid)
                       throws CacheException

Runs method sys_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.

Parameters:
db - represented as Database
oid - represented as com.intersys.objects.Oid default argument concurrency set to -1
Throws:
CacheException - if any error occured while running the method.
See Also:
sys_Delete(Database,com.intersys.objects.Oid,java.lang.Integer), Method %Delete

sys_Delete

public static void sys_Delete(Database db,
                              Oid oid,
                              java.lang.Integer concurrency)
                       throws CacheException

Runs method sys_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.

Parameters:
db - represented as Database
oid - represented as com.intersys.objects.Oid
concurrency - represented as java.lang.Integer
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %Delete

sys_DeleteExtent

public static void sys_DeleteExtent(Database db,
                                    java.lang.Integer concurrency,
                                    StringHolder deletecount,
                                    StringHolder instancecount)
                             throws CacheException

Runs method sys_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.

Returns a %Status value indicating success or failure.

Parameters:
db - represented as Database
concurrency - represented as java.lang.Integer
deletecount - represented as com.intersys.objects.StringHolder
instancecount - represented as com.intersys.objects.StringHolder
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %DeleteExtent

sys_DeleteId

public static void sys_DeleteId(Database db,
                                java.lang.String id)
                         throws CacheException

Runs method sys_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 and Id value instead of an OID value to find an object. Refer to About Concurrency for more details on the optional concurrency argument.

Parameters:
db - represented as Database
id - represented as java.lang.String default argument concurrency set to -1
Throws:
CacheException - if any error occured while running the method.
See Also:
sys_DeleteId(Database,java.lang.String,java.lang.Integer), Method %DeleteId

sys_DeleteId

public static void sys_DeleteId(Database db,
                                java.lang.String id,
                                java.lang.Integer concurrency)
                         throws CacheException

Runs method sys_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 and Id value instead of an OID value to find an object. Refer to About Concurrency for more details on the optional concurrency argument.

Parameters:
db - represented as Database
id - represented as java.lang.String
concurrency - represented as java.lang.Integer
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %DeleteId

sys_Exists

public static java.lang.Boolean sys_Exists(Database db)
                                    throws CacheException

Runs method sys_Exists in Cache.

Parameters:
db - represented as Database default argument oid set to ""
Throws:
CacheException - if any error occured while running the method.
See Also:
sys_Exists(Database,com.intersys.objects.Oid), Method %Exists

sys_Exists

public static java.lang.Boolean sys_Exists(Database db,
                                           Oid oid)
                                    throws CacheException

Runs method sys_Exists in Cache.

Parameters:
db - represented as Database
oid - represented as com.intersys.objects.Oid
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %Exists

sys_ExistsId

public static java.lang.Boolean sys_ExistsId(Database db,
                                             java.lang.String id)
                                      throws CacheException

Runs method sys_ExistsId in Cache.

Parameters:
db - represented as Database
id - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %ExistsId

sys_Extends

public static java.lang.Integer sys_Extends(Database db,
                                            java.lang.String isclass)
                                     throws CacheException

Runs method sys_Extends in Cache.

Description: Returns true (1) if this class is inherited either via primary or secondary inheritance from 'isclass'.

Parameters:
db - represented as Database
isclass - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %Extends

sys_GetParameter

public static java.lang.String sys_GetParameter(Database db)
                                         throws CacheException

Runs method sys_GetParameter in Cache.

Description: This method returns the value of a parameter at runtime

Parameters:
db - represented as Database default argument paramname set to ""
Throws:
CacheException - if any error occured while running the method.
See Also:
sys_GetParameter(Database,java.lang.String), Method %GetParameter

sys_GetParameter

public static java.lang.String sys_GetParameter(Database db,
                                                java.lang.String paramname)
                                         throws CacheException

Runs method sys_GetParameter in Cache.

Description: This method returns the value of a parameter at runtime

Parameters:
db - represented as Database
paramname - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %GetParameter

sys_IsA

public static java.lang.Integer sys_IsA(Database db,
                                        java.lang.String isclass)
                                 throws CacheException

Runs method sys_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.

Parameters:
db - represented as Database
isclass - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %IsA

sys_KillExtent

public static void sys_KillExtent(Database db)
                           throws CacheException

Runs method sys_KillExtent in Cache.

Parameters:
db - represented as Database
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %KillExtent

sys_PackageName

public static java.lang.String sys_PackageName(Database db)
                                        throws CacheException

Runs method sys_PackageName in Cache.

Description: Returns the object's package name.

Parameters:
db - represented as Database
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %PackageName

sys_PurgeIndices

public static void sys_PurgeIndices(Database db)
                             throws CacheException

Runs method sys_PurgeIndices in Cache.

Parameters:
db - represented as Database default argument idxlist set to ""
Throws:
CacheException - if any error occured while running the method.
See Also:
sys_PurgeIndices(Database,com.intersys.objects.SList), Method %PurgeIndices

sys_PurgeIndices

public static void sys_PurgeIndices(Database db,
                                    SList idxlist)
                             throws CacheException

Runs method sys_PurgeIndices in Cache.

Parameters:
db - represented as Database
idxlist - represented as com.intersys.objects.SList
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %PurgeIndices

sys_SortBegin

public static void sys_SortBegin(Database db)
                          throws CacheException

Runs method sys_SortBegin in Cache.

Parameters:
db - represented as Database default argument idxlist set to "" default argument excludeunique set to 0
Throws:
CacheException - if any error occured while running the method.
See Also:
sys_SortBegin(Database,com.intersys.objects.SList,java.lang.Integer), Method %SortBegin

sys_SortBegin

public static void sys_SortBegin(Database db,
                                 SList idxlist)
                          throws CacheException

Runs method sys_SortBegin in Cache.

Parameters:
db - represented as Database
idxlist - represented as com.intersys.objects.SList default argument excludeunique set to 0
Throws:
CacheException - if any error occured while running the method.
See Also:
sys_SortBegin(Database,com.intersys.objects.SList,java.lang.Integer), Method %SortBegin

sys_SortBegin

public static void sys_SortBegin(Database db,
                                 SList idxlist,
                                 java.lang.Integer excludeunique)
                          throws CacheException

Runs method sys_SortBegin in Cache.

Parameters:
db - represented as Database
idxlist - represented as com.intersys.objects.SList
excludeunique - represented as java.lang.Integer
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %SortBegin

sys_SortEnd

public static void sys_SortEnd(Database db)
                        throws CacheException

Runs method sys_SortEnd in Cache.

Parameters:
db - represented as Database default argument idxlist set to "" default argument commit set to 1
Throws:
CacheException - if any error occured while running the method.
See Also:
sys_SortEnd(Database,com.intersys.objects.SList,java.lang.Integer), Method %SortEnd

sys_SortEnd

public static void sys_SortEnd(Database db,
                               SList idxlist)
                        throws CacheException

Runs method sys_SortEnd in Cache.

Parameters:
db - represented as Database
idxlist - represented as com.intersys.objects.SList default argument commit set to 1
Throws:
CacheException - if any error occured while running the method.
See Also:
sys_SortEnd(Database,com.intersys.objects.SList,java.lang.Integer), Method %SortEnd

sys_SortEnd

public static void sys_SortEnd(Database db,
                               SList idxlist,
                               java.lang.Integer commit)
                        throws CacheException

Runs method sys_SortEnd in Cache.

Parameters:
db - represented as Database
idxlist - represented as com.intersys.objects.SList
commit - represented as java.lang.Integer
Throws:
CacheException - if any error occured while running the method.
See Also:
Method %SortEnd

NameIdxExists

public java.lang.Boolean NameIdxExists(java.lang.String K1)
                                throws CacheException

Runs method NameIdxExists in Cache.

Parameters:
K1 - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
Method NameIdxExists

OnPopulate

public void OnPopulate()
                throws CacheException

Runs method OnPopulate in Cache.

Throws:
CacheException - if any error occured while running the method.
See Also:
Method OnPopulate

Populate

public static java.lang.Integer Populate(Database db)
                                  throws CacheException

Runs method Populate in Cache.

Description: Creates up to count instances an object and stores them in the database.

If verbose is true, then details are echoed to the console.

If DeferIndices is true, then indices are sorted at the end of the operation.

Returns the number of instances successfully created.

For more information refer to About Populate.

Parameters:
db - represented as Database default argument count set to 10 default argument verbose set to 0 default argument DeferIndices set to 1 default argument objects set to 0
Throws:
CacheException - if any error occured while running the method.
See Also:
Populate(Database,java.lang.Integer,java.lang.Integer,java.lang.Integer,com.intersys.objects.IntegerHolder), Method Populate

Populate

public static java.lang.Integer Populate(Database db,
                                         java.lang.Integer count)
                                  throws CacheException

Runs method Populate in Cache.

Description: Creates up to count instances an object and stores them in the database.

If verbose is true, then details are echoed to the console.

If DeferIndices is true, then indices are sorted at the end of the operation.

Returns the number of instances successfully created.

For more information refer to About Populate.

Parameters:
db - represented as Database
count - represented as java.lang.Integer default argument verbose set to 0 default argument DeferIndices set to 1 default argument objects set to 0
Throws:
CacheException - if any error occured while running the method.
See Also:
Populate(Database,java.lang.Integer,java.lang.Integer,java.lang.Integer,com.intersys.objects.IntegerHolder), Method Populate

Populate

public static java.lang.Integer Populate(Database db,
                                         java.lang.Integer count,
                                         java.lang.Integer verbose)
                                  throws CacheException

Runs method Populate in Cache.

Description: Creates up to count instances an object and stores them in the database.

If verbose is true, then details are echoed to the console.

If DeferIndices is true, then indices are sorted at the end of the operation.

Returns the number of instances successfully created.

For more information refer to About Populate.

Parameters:
db - represented as Database
count - represented as java.lang.Integer
verbose - represented as java.lang.Integer default argument DeferIndices set to 1 default argument objects set to 0
Throws:
CacheException - if any error occured while running the method.
See Also:
Populate(Database,java.lang.Integer,java.lang.Integer,java.lang.Integer,com.intersys.objects.IntegerHolder), Method Populate

Populate

public static java.lang.Integer Populate(Database db,
                                         java.lang.Integer count,
                                         java.lang.Integer verbose,
                                         java.lang.Integer DeferIndices)
                                  throws CacheException

Runs method Populate in Cache.

Description: Creates up to count instances an object and stores them in the database.

If verbose is true, then details are echoed to the console.

If DeferIndices is true, then indices are sorted at the end of the operation.

Returns the number of instances successfully created.

For more information refer to About Populate.

Parameters:
db - represented as Database
count - represented as java.lang.Integer
verbose - represented as java.lang.Integer
DeferIndices - represented as java.lang.Integer default argument objects set to 0
Throws:
CacheException - if any error occured while running the method.
See Also:
Populate(Database,java.lang.Integer,java.lang.Integer,java.lang.Integer,com.intersys.objects.IntegerHolder), Method Populate

Populate

public static java.lang.Integer Populate(Database db,
                                         java.lang.Integer count,
                                         java.lang.Integer verbose,
                                         java.lang.Integer DeferIndices,
                                         IntegerHolder objects)
                                  throws CacheException

Runs method Populate in Cache.

Description: Creates up to count instances an object and stores them in the database.

If verbose is true, then details are echoed to the console.

If DeferIndices is true, then indices are sorted at the end of the operation.

Returns the number of instances successfully created.

For more information refer to About Populate.

Parameters:
db - represented as Database
count - represented as java.lang.Integer
verbose - represented as java.lang.Integer
DeferIndices - represented as java.lang.Integer
objects - represented as com.intersys.objects.IntegerHolder
Throws:
CacheException - if any error occured while running the method.
See Also:
Method Populate

PopulateSerial

public static java.lang.String PopulateSerial(Database db)
                                       throws CacheException

Runs method PopulateSerial in Cache.

Description: Create a single instance of a serial object.

Parameters:
db - represented as Database
Throws:
CacheException - if any error occured while running the method.
See Also:
Method PopulateSerial

PrintPayroll

public void PrintPayroll()
                  throws CacheException

Runs method PrintPayroll in Cache.

Description: This method prints out the payroll for this company by iterating over all the Employee objects related to it and printing their names and salaries.
You can try this out from the Caché command line by opening an instance of Company object and invoking this method: Set company = ##class(Sample.Company).%OpenId(1) Do company.PrintPayroll()

Throws:
CacheException - if any error occured while running the method.
See Also:
Method PrintPayroll

TaxIDIdxExists

public java.lang.Boolean TaxIDIdxExists(java.lang.String K1)
                                 throws CacheException

Runs method TaxIDIdxExists in Cache.

Parameters:
K1 - represented as java.lang.String
Throws:
CacheException - if any error occured while running the method.
See Also:
Method TaxIDIdxExists

query_Extent

public static CacheQuery query_Extent(Database db)
                               throws CacheException

Returns a CallableStatement for query Extent.

Parameters:
db - represented as Database
Throws:
CacheException - if any error occured while running the method.

addToBatchInsert

public static java.lang.Object addToBatchInsert(java.lang.Object batch,
                                                java.sql.Connection con,
                                                java.lang.String Mission,
                                                java.lang.String Name,
                                                java.lang.Integer Revenue,
                                                java.lang.String TaxID)
                                         throws java.sql.SQLException
Throws:
java.sql.SQLException

executeBatchInsert

public static java.util.List executeBatchInsert(java.sql.Connection con,
                                                java.lang.Object batch,
                                                int nolock)
                                         throws java.sql.SQLException
Throws:
java.sql.SQLException