|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.jso.schema.JSOStorableClass
Meta class for storable classes.
| Constructor Summary | |
JSOStorableClass(ClassDescriptor aDescriptor)
Constructs the storable class. |
|
| Method Summary | |
void |
addJavaSubclass(java.lang.Class aClass)
Adds a class to the set of subclasses of the storable class. |
boolean |
check(StorableClass aClass)
Checks this storable class against another one. |
boolean |
equals(java.lang.Object o)
Indicates whether some other storable class is "equal to" this one. |
static java.lang.reflect.Method |
getCallbackMethod(java.lang.Class aClass,
java.lang.String method)
Returns callback method, or null if class does not have the
method. |
CID |
getCID()
Returns the class' schema identification. |
static java.lang.reflect.Field |
getContainerField()
Returns a generic fake field for storing values of container classes. |
java.lang.reflect.Field |
getContainerValueField()
Returns a generic fake field for storing values of container classes. |
java.lang.String |
getDeleteStatement()
Returns the delete statement for an object in the form: delete from <table> where oid = ? |
static java.lang.reflect.Field |
getField(java.lang.Class aClass,
java.lang.String name)
Returns a field, or null if class does not have the
field. |
java.lang.Integer |
getFieldType(java.lang.reflect.Field field)
Returns the type of a field as established in StorableField. |
long |
getId()
Returns the cataloged id of this class descriptor's class. |
java.lang.String |
getInsertStatement()
Returns an insert statement for an object in the form: insert into <table> (oid,<fields>) values (? |
java.util.Set |
getJavaAccessibleFields()
Returns the set of accessible fields of the storable class. |
java.lang.Class |
getJavaClass()
Returns the target java class. |
java.lang.reflect.Field |
getJavaField(java.lang.String fieldName)
Returns a fields of the storable class. |
java.util.Set |
getJavaFields()
Returns the set of fields of the storable class. |
java.util.Set |
getJavaReferenceFields()
Returns the set of fields of the storable class that are from types StorableField.OBJECT or
StorableField.CONTAINER. |
java.util.Set |
getJavaSubclasses()
Returns the set of subclasses of the storable class. |
java.util.Set |
getJavaSummaryFields()
Returns the set of summary fields of the storable class. |
java.util.Set |
getJavaSuperclasses()
Returns the set of superclasses of the storable class. |
java.lang.reflect.Field |
getJsoMetadataField()
Returns class's jsoMetadata field. |
java.lang.reflect.Method |
getJsoPostRetrieveMethod()
Returns class's jsoPostRetrieve() method. |
java.lang.reflect.Method |
getJsoPreDeleteMethod()
Returns class's jsoPreDelete() method. |
java.lang.reflect.Method |
getJsoPreStoreMethod()
Returns class's jsoPreStore() method. |
java.lang.String |
getSelectStatement(boolean summary)
Returns a select statement for an object in the form: select <fields> from <table> where oid = ? |
java.lang.String |
getTableName()
Returns the name of the storable class's corresponding table. |
java.lang.String |
getUpdateStatement()
Returns an update statement for an object in the form: update <table> set <fields = ? |
static java.lang.reflect.Field |
getValueField()
Returns a generic fake field for storing values of wrapper classes. |
java.lang.reflect.Constructor |
getVoidConstructor()
Returns class's void constructor. |
java.lang.reflect.Field |
getWrapperValueField()
Returns a generic fake field for storing values of wrapper classes. |
int |
hashCode()
Returns a hash code value for the class descriptor. |
boolean |
isAccessible(java.lang.reflect.Field field)
Indicates if the supplied field is accessible. |
boolean |
isChecked()
Indicates if this storable class has been checked agains corresponding class. |
boolean |
isCollectionType()
Indicates if storable class is a collection type. |
boolean |
isContainerType()
Indicates if storable class is a container type. |
boolean |
isGarbageCollectable()
Indicates if the storable class is garabage collectable. |
boolean |
isMapType()
Indicates if storable class is a map type. |
boolean |
isStorableType()
Indicates if storable class is a storable type. |
boolean |
isSummary(java.lang.reflect.Field field)
Indicates if the supplied field is a summary field. |
java.lang.Object |
newInstance()
Creates new instance of storable class' target java class. |
java.lang.Object |
newProxy(OID oid,
boolean isSummary,
StorageManager aManager)
Creates a new proxy to storable class' target java class. |
void |
removeJavaSubclass(java.lang.Class aClass)
Removes a class to the set of subclasses of the storable class. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JSOStorableClass(ClassDescriptor aDescriptor)
throws StorageException
aDescriptor - Correspondin class descriptor.| Method Detail |
public java.lang.Class getJavaClass()
getJavaClass in interface StorableClasspublic long getId()
getId in interface StorableClasspublic CID getCID()
getCID in interface StorableClasspublic boolean isChecked()
isChecked in interface StorableClasstrue if descriptor has been checked; false
otherwise.public boolean isGarbageCollectable()
isGarbageCollectable in interface StorableClasstrue if the storable class is garabage collectable;
false> otherwise.
public java.lang.reflect.Field getJavaField(java.lang.String fieldName)
throws StorageException
getJavaField in interface StorableClassfieldName - The name of the field to be returned.
StorageException - If no such field exists int the class.
public java.lang.Integer getFieldType(java.lang.reflect.Field field)
throws StorageException
StorableField.
getFieldType in interface StorableClassfield - The field of which the name should be returned.
StorageException - If no such field exists int the class.public java.lang.reflect.Field getJsoMetadataField()
jsoMetadata field.
getJsoMetadataField in interface StorableClasspublic java.lang.reflect.Method getJsoPreStoreMethod()
jsoPreStore() method.
getJsoPreStoreMethod in interface StorableClassjsoPreStore() method if class has it;
null otherwise.public java.lang.reflect.Method getJsoPostRetrieveMethod()
jsoPostRetrieve() method.
getJsoPostRetrieveMethod in interface StorableClassjsoPostRetrieve() method if class has it;
null otherwise.public java.lang.reflect.Method getJsoPreDeleteMethod()
jsoPreDelete() method.
getJsoPreDeleteMethod in interface StorableClassjsoPreDelete() method if class has it;
null otherwise.public java.lang.reflect.Constructor getVoidConstructor()
getVoidConstructor in interface StorableClassnull otherwise.
public boolean isSummary(java.lang.reflect.Field field)
throws StorageException
isSummary in interface StorableClasstrue if the field is part of the class' summary;
false otherwise;
StorageException
public boolean isAccessible(java.lang.reflect.Field field)
throws StorageException
isAccessible in interface StorableClasstrue if the field may be accessed during query
processing; false otherwise;
StorageExceptionpublic static java.lang.reflect.Field getValueField()
public java.lang.reflect.Field getWrapperValueField()
getWrapperValueField in interface StorableClasspublic static java.lang.reflect.Field getContainerField()
public java.lang.reflect.Field getContainerValueField()
getContainerValueField in interface StorableClasspublic java.util.Set getJavaFields()
getJavaFields in interface StorableClasspublic java.util.Set getJavaAccessibleFields()
getJavaAccessibleFields in interface StorableClasspublic java.util.Set getJavaSummaryFields()
getJavaSummaryFields in interface StorableClasspublic java.util.Set getJavaReferenceFields()
StorableField.OBJECT or
StorableField.CONTAINER.
getJavaReferenceFields in interface StorableClassOBJECT and CONTAINER fields of
the storable class.public java.util.Set getJavaSubclasses()
getJavaSubclasses in interface StorableClasspublic java.util.Set getJavaSuperclasses()
getJavaSuperclasses in interface StorableClasspublic void addJavaSubclass(java.lang.Class aClass)
addJavaSubclass in interface StorableClassaClass - The class to be added.public void removeJavaSubclass(java.lang.Class aClass)
removeJavaSubclass in interface StorableClassaClass - The class to be removed.public java.lang.String getTableName()
getTableName in interface StorableClasspublic java.lang.String getInsertStatement()
insert into <table> (oid,<fields>) values (?,<?>)
getInsertStatement in interface StorableClassprepared statement.public java.lang.String getUpdateStatement()
update <table> set <fields = ?> where oid = ?
getUpdateStatement in interface StorableClassprepared statement. May return
null if class has no fields.public java.lang.String getDeleteStatement()
delete from <table> where oid = ?
getDeleteStatement in interface StorableClassprepared statement.public java.lang.String getSelectStatement(boolean summary)
select <fields> from <table> where oid = ?
getSelectStatement in interface StorableClasssummary - If true only summary fields are included in the
statement; otherwise all fields are included.
prepared statement. May return
null if class has no fields.public boolean check(StorableClass aClass)
check in interface StorableClassaClass - The class to be checked against.
true if check was successfull; false
otherwise.public boolean equals(java.lang.Object o)
o - The object with which to compare.
true if the storable class is the same as the
storable class argument; false otherwise.public int hashCode()
public static java.lang.reflect.Field getField(java.lang.Class aClass,
java.lang.String name)
null if class does not have the
field.
public static java.lang.reflect.Method getCallbackMethod(java.lang.Class aClass,
java.lang.String method)
null if class does not have the
method.
public boolean isContainerType()
isContainerType in interface StorableClasstrue if storable class is a collection or a map type;
false otherwise.public boolean isCollectionType()
isCollectionType in interface StorableClasstrue if storable class is a collection type;
false otherwise.public boolean isMapType()
isMapType in interface StorableClasstrue if storable class is a map type;
false otherwise.public boolean isStorableType()
isStorableType in interface StorableClasstrue if storable class is a
storable type; false
otherwise.
public java.lang.Object newInstance()
throws StorageException
newInstance in interface StorableClassStorageException
public java.lang.Object newProxy(OID oid,
boolean isSummary,
StorageManager aManager)
throws StorageException
newProxy in interface StorableClassoid - Target object's identification.isSummary - If only summary fields of target object should be used.aManager - Storage manager to which proxy will communicate.
StorageException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||