|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StoreInfo
For any class Clazz
that implements Persistent,
you may define Clazz_StoreInfo
which implements
this interface (but note that this technique is deprecated in
favor of PersistentClass
annotations).
StoreInfo is used to customize how the object is persisted, whether it has unique or non-unique indexes, how values are marshalled and unmarshalled, etc.
Instead of directly implementing this interface,
extending AbstractStoreInfo
is recommended.
getIndexes
method, for example, as follows:
public class User_StoreInfo extends AbstractStoreInfo {
public User_StoreInfo() {
super (User.class);
}
public Index[] getIndexes (Store store) {
return new Index[] {
new Index (true, "userName")
};
}
}
Method Summary | |
---|---|
java.lang.Object |
create(Store store)
Creates a new instance of the class described by this StoreInfo instance. |
java.lang.Class |
getBeanClass()
|
java.lang.ClassLoader |
getClassLoader()
Gets a class loader which may be used to find the underlying StoreInfo class. |
FieldDescriptor |
getFieldDescriptor(Store store,
java.beans.PropertyDescriptor pd)
Gets a field descriptor for the given PropertyDescriptor. |
java.lang.String |
getIdField()
|
Index[] |
getIndexes(Store store)
Gets indexes that should be used in the underlying database table. |
java.beans.PropertyDescriptor |
getPropertyDescriptor(java.lang.String propertyName)
Obtains the PropertyDescriptor for a property name. |
java.beans.PropertyDescriptor |
getPropertyDescriptorByNormalFieldName(Store store,
java.lang.String fieldName)
|
java.beans.PropertyDescriptor[] |
getPropertyDescriptors()
|
java.lang.String |
getTableName(int maxLength)
|
boolean |
isAutoIncrementRequested()
|
boolean |
isDeleteFields()
|
boolean |
isUserManaged()
Gets a boolean value indicating whether table creation and alteration is user-managed as opposed to automatic. |
java.lang.Object |
marshallValue(java.beans.PropertyDescriptor pd,
java.lang.Object propertyValue)
Marshalls a property value except for any of type Persistent. |
java.lang.Object |
unmarshallValue(java.beans.PropertyDescriptor pd,
java.lang.Object fieldValue)
Unarshalls a field value except for any of type Persistent. |
Method Detail |
---|
java.lang.String getTableName(int maxLength)
java.lang.Class getBeanClass()
java.lang.String getIdField()
boolean isDeleteFields()
boolean isAutoIncrementRequested()
java.beans.PropertyDescriptor[] getPropertyDescriptors()
java.lang.Object create(Store store) throws StoreException
StoreException
FieldDescriptor getFieldDescriptor(Store store, java.beans.PropertyDescriptor pd) throws StoreException
StoreException
java.beans.PropertyDescriptor getPropertyDescriptor(java.lang.String propertyName)
java.beans.PropertyDescriptor getPropertyDescriptorByNormalFieldName(Store store, java.lang.String fieldName)
Index[] getIndexes(Store store) throws StoreException
StoreException
java.lang.Object marshallValue(java.beans.PropertyDescriptor pd, java.lang.Object propertyValue) throws StoreException
StoreException
java.lang.Object unmarshallValue(java.beans.PropertyDescriptor pd, java.lang.Object fieldValue) throws StoreException
StoreException
java.lang.ClassLoader getClassLoader()
boolean isUserManaged()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |