/** * Get the field types for a <code>PersistenceCapable</code> class. */ public static Class<?>[] getFieldTypes(Class<?> pcClass) { Meta meta = getMeta(pcClass); return meta.fieldTypes; }
/** * Return the persistent superclass for a <code>PersistenceCapable</code> * class, or null if none. The superclass may or may not implement * {@link PersistenceCapable}, depending on the access type of the class. */ public static Class<?> getPersistentSuperclass(Class<?> pcClass) { Meta meta = getMeta(pcClass); return meta.pcSuper; }
/** * Get the field names for a <code>PersistenceCapable</code> class. */ public static String[] getFieldNames(Class pcClass) { Meta meta = getMeta(pcClass); return meta.fieldNames; }
/** * Return the alias for the given type. */ public static String getTypeAlias(Class<?> pcClass) { return getMeta(pcClass).alias; }
/** * Return the persistent superclass for a <code>PersistenceCapable</code> * class, or null if none. The superclass may or may not implement * {@link PersistenceCapable}, depending on the access type of the class. */ public static Class<?> getPersistentSuperclass(Class<?> pcClass) { Meta meta = getMeta(pcClass); return meta.pcSuper; }
/** * Return the alias for the given type. */ public static String getTypeAlias(Class<?> pcClass) { return getMeta(pcClass).alias; }
/** * Return the persistence-capable type for <code>type</code>. This might * be a generated subclass of <code>type</code>. * * @since 1.1.0 */ public static Class<?> getPCType(Class<?> type) { Meta meta = getMeta(type); return (meta.pc == null) ? null : meta.pc.getClass(); }
/** * Return the persistence-capable type for <code>type</code>. This might * be a generated subclass of <code>type</code>. * * @since 1.1.0 */ public static Class<?> getPCType(Class<?> type) { Meta meta = getMeta(type); return (meta.pc == null) ? null : meta.pc.getClass(); }
/** * Create a new instance of the class and assign its state manager. * The new instance has its flags set to <code>LOAD_REQUIRED</code>. */ public static PersistenceCapable newInstance(Class<?> pcClass, StateManager sm, boolean clear) { Meta meta = getMeta(pcClass); return (meta.pc == null) ? null : meta.pc.pcNewInstance(sm, clear); }
/** * Create a new identity object for the given * <code>PersistenceCapable</code> class. */ public static Object newObjectId(Class pcClass) { Meta meta = getMeta(pcClass); return (meta.pc == null) ? null : meta.pc.pcNewObjectIdInstance(); }
/** * Create a new identity object for the given * <code>PersistenceCapable</code> class, using the <code>String</code> * form of the constructor. */ public static Object newObjectId(Class<?> pcClass, String str) { Meta meta = getMeta(pcClass); return (meta.pc == null) ? null : meta.pc.pcNewObjectIdInstance(str); }
/** * Create a new identity object for the given * <code>PersistenceCapable</code> class. */ public static Object newObjectId(Class<?> pcClass) { Meta meta = getMeta(pcClass); return (meta.pc == null) ? null : meta.pc.pcNewObjectIdInstance(); }
/** * Create a new identity object for the given * <code>PersistenceCapable</code> class. */ public static Object newObjectId(Class<?> pcClass) { Meta meta = getMeta(pcClass); return (meta.pc == null) ? null : meta.pc.pcNewObjectIdInstance(); }
/** * Create a new identity object for the given * <code>PersistenceCapable</code> class. */ public static Object newObjectId(Class<?> pcClass) { Meta meta = getMeta(pcClass); return (meta.pc == null) ? null : meta.pc.pcNewObjectIdInstance(); }
/** * Create a new identity object for the given * <code>PersistenceCapable</code> class, using the <code>String</code> * form of the constructor. */ public static Object newObjectId(Class<?> pcClass, String str) { Meta meta = getMeta(pcClass); return (meta.pc == null) ? null : meta.pc.pcNewObjectIdInstance(str); }
/** * Create a new instance of the class and assign its state manager and oid. * The new instance has its flags set to <code>LOAD_REQUIRED</code>. */ public static PersistenceCapable newInstance(Class<?> pcClass, StateManager sm, Object oid, boolean clear) { Meta meta = getMeta(pcClass); return (meta.pc == null) ? null : meta.pc.pcNewInstance(sm, oid, clear); }
/** * Copy fields from an outside source to the key fields in the identity * object. */ public static void copyKeyFieldsToObjectId(Class<?> pcClass, FieldSupplier fm, Object oid) { Meta meta = getMeta(pcClass); if (meta.pc == null) throw new UserException(_loc.get("copy-no-id", pcClass)); meta.pc.pcCopyKeyFieldsToObjectId(fm, oid); }
/** * Copy fields from an outside source to the key fields in the identity * object. */ public static void copyKeyFieldsToObjectId(Class<?> pcClass, FieldSupplier fm, Object oid) { Meta meta = getMeta(pcClass); if (meta.pc == null) throw new UserException(_loc.get("copy-no-id", pcClass)); meta.pc.pcCopyKeyFieldsToObjectId(fm, oid); }
/** * Copy fields to an outside source from the key fields in the identity * object. */ public static void copyKeyFieldsFromObjectId(Class<?> pcClass, FieldConsumer fm, Object oid) { Meta meta = getMeta(pcClass); if (meta.pc == null) throw new UserException(_loc.get("copy-no-id", pcClass)); meta.pc.pcCopyKeyFieldsFromObjectId(fm, oid); }
/** * Copy fields to an outside source from the key fields in the identity * object. */ public static void copyKeyFieldsFromObjectId(Class<?> pcClass, FieldConsumer fm, Object oid) { Meta meta = getMeta(pcClass); if (meta.pc == null) throw new UserException(_loc.get("copy-no-id", pcClass)); meta.pc.pcCopyKeyFieldsFromObjectId(fm, oid); }