|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.click.extras.cayenne.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 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 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 |