|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.click.extras.cayenne.CayenneUtils
public final class CayenneUtils
Provides Cayenne DataObject utility methods to looking up object by their primary key.
This class was derived from the Cayenne DataObjectUtils class.
Constructor Summary | |
---|---|
CayenneUtils()
|
Method Summary | |
---|---|
static void |
applyMetaData(Form form,
Class<?> dataObjectClass)
Applies the DataObject class validation database meta data to the form fields. |
static org.apache.cayenne.ObjectId |
createObjectId(org.apache.cayenne.ObjectContext objectContext,
Class dataObjectClass,
Object pk)
Create a new ObjectId for the given ObjectContext, data object class and primary key. |
static org.apache.cayenne.DataObject |
getObjectForPK(org.apache.cayenne.ObjectContext objectContext,
Class dataObjectClass,
Object pk)
Return the DataObject for the given context, data object class and primary key value. |
static Class |
getPkClass(org.apache.cayenne.ObjectContext objectContext,
Class dataObjectClass)
Return the primary key class for the given DataObject class. |
static String |
getPkName(org.apache.cayenne.ObjectContext objectContext,
Class dataObjectClass)
Return the database primary key column name for the given data object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CayenneUtils()
Method Detail |
---|
public static void applyMetaData(Form form, Class<?> dataObjectClass)
form
- the form which fields to apply metadata todataObjectClass
- the dataObject class which metadata to applypublic static org.apache.cayenne.ObjectId createObjectId(org.apache.cayenne.ObjectContext objectContext, Class dataObjectClass, Object pk)
objectContext
- the Cayenne ObjectContextdataObjectClass
- the class of the Cayenne DataObjectpk
- the data object primary key
public static org.apache.cayenne.DataObject getObjectForPK(org.apache.cayenne.ObjectContext objectContext, Class dataObjectClass, Object pk)
objectContext
- the Cayenne ObjectContext for the data objectdataObjectClass
- the class of the Cayenne DataObjectpk
- the primary key of the DataObject
public static Class getPkClass(org.apache.cayenne.ObjectContext objectContext, Class dataObjectClass)
objectContext
- the Cayenne ObjectContext for the data objectdataObjectClass
- the DataObject class to get the primary key for
public static String getPkName(org.apache.cayenne.ObjectContext objectContext, Class dataObjectClass)
objectContext
- the Cayenne ObjectContext for the data objectdataObjectClass
- the class of the data object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |