Sample
Class Address

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

public class Address
extends SerialObject
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.intersys.classes.CacheRootObject
mInternal
 
Constructor Summary
Address(CacheObject ref)
          NB: DO NOT USE IN APPLICATION(!!!).
Address(Database db)
          Creates a new instance of object "Address" in Cache database and corresponding object of class Address.
Address(Database db, java.lang.String initstr)
           
 
Method Summary
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 Address.
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 Address.
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 checkCityValid(Database db)
          Verifies that indexes for property City in zObjVal are the same as in Cache.
static void checkStateValid(Database db)
          Verifies that indexes for property State in zObjVal are the same as in Cache.
static void checkStreetValid(Database db)
          Verifies that indexes for property Street in zObjVal are the same as in Cache.
static void checkZipValid(Database db)
          Verifies that indexes for property Zip in zObjVal are the same as in Cache.
static RegisteredObject createClientObject(Database db)
           
 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 Address as it is in Cache Database.
 java.lang.String getCity()
          Returns value of property City.
 java.lang.String getState()
          Returns value of property State.
 java.lang.String getStreet()
          Returns value of property Street.
 java.lang.String getZip()
          Returns value of property Zip.
static java.lang.String LogicalToOdbc(Database db)
          Runs method LogicalToOdbc in Cache.
static java.lang.String LogicalToOdbc(Database db, java.lang.String val)
          Runs method LogicalToOdbc in Cache.
static java.lang.String OdbcToLogical(Database db)
          Runs method OdbcToLogical in Cache.
static java.lang.String OdbcToLogical(Database db, java.lang.String val)
          Runs method OdbcToLogical in Cache.
 void OnPopulate()
          Runs method OnPopulate in Cache.
static SerialObject open(Database db, byte[] serialState)
           
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 setCity(java.lang.String value)
          Sets new value for City.
 void setState(java.lang.String value)
          Sets new value for State.
 void setStreet(java.lang.String value)
          Sets new value for Street.
 void setZip(java.lang.String value)
          Sets new value for Zip.
static java.lang.String sys_ClassName(Database db, java.lang.Boolean fullname)
          Runs method sys_ClassName 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 java.lang.String sys_PackageName(Database db)
          Runs method sys_PackageName in Cache.
 
Methods inherited from class com.intersys.classes.SerialObject
_getSwizzleObject, _getSwizzleObject, _getSwizzleObject, _logicalToOdbc, _logicalToOdbc, _odbcToLogical, _odbcToLogical, getOid, openOnServer, serialize, serialize
 
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

Address

public Address(CacheObject ref)
        throws CacheException

NB: DO NOT USE IN APPLICATION(!!!).
Use Address._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)

Address

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

Address

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

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

createClientObject

public static RegisteredObject createClientObject(Database db)
                                           throws CacheException
Throws:
CacheException

open

public static SerialObject open(Database db,
                                byte[] serialState)
                         throws CacheException
Throws:
CacheException

_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 Address.

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 Address or of any of its subclasses. Cast to Address 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), Address(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 Address.

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 Address or of any of its subclasses. Cast to Address 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), Address(com.intersys.objects.Database)

getCacheClassName

public static java.lang.String getCacheClassName()
Returns class name of the class Address 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

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

checkCityValid

public static void checkCityValid(Database db)
                           throws CacheException
Verifies that indexes for property City 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)

getCity

public java.lang.String getCity()
                         throws CacheException
Returns value of property City.

Description: The city name.

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

setCity

public void setCity(java.lang.String value)
             throws CacheException
Sets new value for City.

Description: The city name.

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

checkStateValid

public static void checkStateValid(Database db)
                            throws CacheException
Verifies that indexes for property State 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)

getState

public java.lang.String getState()
                          throws CacheException
Returns value of property State.

Description: The 2-letter state abbreviation.

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

setState

public void setState(java.lang.String value)
              throws CacheException
Sets new value for State.

Description: The 2-letter state abbreviation.

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

checkStreetValid

public static void checkStreetValid(Database db)
                             throws CacheException
Verifies that indexes for property Street 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)

getStreet

public java.lang.String getStreet()
                           throws CacheException
Returns value of property Street.

Description: The street address.

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

setStreet

public void setStreet(java.lang.String value)
               throws CacheException
Sets new value for Street.

Description: The street address.

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

checkZipValid

public static void checkZipValid(Database db)
                          throws CacheException
Verifies that indexes for property Zip 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)

getZip

public java.lang.String getZip()
                        throws CacheException
Returns value of property Zip.

Description: The 5-digit U.S. Zone Improvement Plan (ZIP) code.

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

setZip

public void setZip(java.lang.String value)
            throws CacheException
Sets new value for Zip.

Description: The 5-digit U.S. Zone Improvement Plan (ZIP) code.

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

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_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_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

LogicalToOdbc

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

Runs method LogicalToOdbc in Cache.

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

LogicalToOdbc

public static java.lang.String LogicalToOdbc(Database db,
                                             java.lang.String val)
                                      throws CacheException

Runs method LogicalToOdbc in Cache.

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

OdbcToLogical

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

Runs method OdbcToLogical in Cache.

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

OdbcToLogical

public static java.lang.String OdbcToLogical(Database db,
                                             java.lang.String val)
                                      throws CacheException

Runs method OdbcToLogical in Cache.

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

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