/** Get the field flags for a <code>PersistenceCapable</code> class. The * order of fields is the same as for field names. * @param pcClass the <code>PersistenceCapable</code> class. * @return the field types for the class. */ public byte[] getFieldFlags (Class pcClass) { Meta meta = getMeta (pcClass); return meta.getFieldFlags(); }
/** Get the persistence-capable superclass for a * <code>PersistenceCapable</code> class. * @param pcClass the <code>PersistenceCapable</code> class. * @return The <code>PersistenceCapable</code> superclass for this class, * or <code>null</code> if there isn't one. */ public Class getPersistenceCapableSuperclass (Class pcClass) { Meta meta = getMeta (pcClass); return meta.getPersistenceCapableSuperclass(); }
/** Get the field types for a <code>PersistenceCapable</code> class. The * order of fields is the same as for field names. * @param pcClass the <code>PersistenceCapable</code> class. * @return the field types for the class. */ public Class[] getFieldTypes (Class pcClass) { Meta meta = getMeta (pcClass); return meta.getFieldTypes(); }
/** Message formatter * @param messageKey the message key * @return the resolved message text */ public String msg (String messageKey) { assertBundle (messageKey); return getMessage (bundle, messageKey); }
/** Create a new instance of the class and assign its * <code>jdoStateManager</code>. The new instance has its * <code>jdoFlags</code> set to <code>LOAD_REQUIRED</code>. * @see PersistenceCapable#jdoNewInstance(StateManager sm) * @param pcClass the <code>PersistenceCapable</code> class. * @param sm the <code>StateManager</code> which will own the new instance. * @return the new instance, or <code>null</code> if the class is not * registered. */ public PersistenceCapable newInstance (Class pcClass, StateManager sm) { Meta meta = getMeta (pcClass); PersistenceCapable pcInstance = meta.getPC(); return pcInstance == null?null:pcInstance.jdoNewInstance(sm); }
/** * Return the version of the instance. * @since 2.0 * @param pc the instance * @return the version of the instance */ public static Object getVersion (Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoGetVersion(); } else { return implHelper.nonBinaryCompatibleGet(pc, getVersion); } } /** Tests whether the parameter instance is dirty.
/** Get the field names for a <code>PersistenceCapable</code> class. The * order of fields is the natural ordering of the <code>String</code> class * (without considering localization). * @param pcClass the <code>PersistenceCapable</code> class. * @return the field names for the class. */ public String[] getFieldNames (Class pcClass) { Meta meta = getMeta (pcClass); return meta.getFieldNames(); }
/** Message formatter * @param messageKey the message key * @param arg1 the first argument * @return the resolved message text */ public String msg (String messageKey, Object arg1) { assertBundle (messageKey); return getMessage (bundle, messageKey, arg1); }
/** Create a new instance of the class and assign its * <code>jdoStateManager</code>. The new instance has its * <code>jdoFlags</code> set to <code>LOAD_REQUIRED</code>. * @see PersistenceCapable#jdoNewInstance(StateManager sm) * @param pcClass the <code>PersistenceCapable</code> class. * @param sm the <code>StateManager</code> which will own the new instance. * @return the new instance, or <code>null</code> if the class is not * registered. */ public PersistenceCapable newInstance (Class pcClass, StateManager sm) { Meta meta = getMeta (pcClass); PersistenceCapable pcInstance = meta.getPC(); return pcInstance == null?null:pcInstance.jdoNewInstance(sm); }
/** * Return the version of the instance. * @since 2.0 * @param pc the instance * @return the version of the instance */ public static Object getVersion (Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoGetVersion(); } else { return implHelper.nonBinaryCompatibleGet(pc, getVersion); } } /** Tests whether the parameter instance is dirty.
/** Get the field flags for a <code>PersistenceCapable</code> class. The * order of fields is the same as for field names. * @param pcClass the <code>PersistenceCapable</code> class. * @return the field types for the class. */ public byte[] getFieldFlags (Class pcClass) { Meta meta = getMeta (pcClass); return meta.getFieldFlags(); }
/** Get the persistence-capable superclass for a * <code>PersistenceCapable</code> class. * @param pcClass the <code>PersistenceCapable</code> class. * @return The <code>PersistenceCapable</code> superclass for this class, * or <code>null</code> if there isn't one. */ public Class getPersistenceCapableSuperclass (Class pcClass) { Meta meta = getMeta (pcClass); return meta.getPersistenceCapableSuperclass(); }
/** Get the field types for a <code>PersistenceCapable</code> class. The * order of fields is the same as for field names. * @param pcClass the <code>PersistenceCapable</code> class. * @return the field types for the class. */ public Class[] getFieldTypes (Class pcClass) { Meta meta = getMeta (pcClass); return meta.getFieldTypes(); }
/** Get the field names for a <code>PersistenceCapable</code> class. The * order of fields is the natural ordering of the <code>String</code> class * (without considering localization). * @param pcClass the <code>PersistenceCapable</code> class. * @return the field names for the class. */ public String[] getFieldNames (Class pcClass) { Meta meta = getMeta (pcClass); return meta.getFieldNames(); }
/** Message formatter * @param messageKey the message key * @param arg the argument * @return the resolved message text */ public String msg (String messageKey, int arg) { assertBundle (messageKey); return getMessage(bundle, messageKey, arg); }
/** Message formatter * @param messageKey the message key * @param args the array of arguments * @return the resolved message text */ public String msg (String messageKey, Object[] args) { assertBundle (messageKey); return getMessage (bundle, messageKey, args); }
/** Message formatter * @param messageKey the message key * @param arg the argument * @return the resolved message text */ public String msg (String messageKey, boolean arg) { assertBundle (messageKey); return getMessage(bundle, messageKey, arg); }
/** Message formatter * @param messageKey the message key * @param arg the argument * @return the resolved message text */ public String msg (String messageKey, int arg) { assertBundle (messageKey); return getMessage(bundle, messageKey, arg); }
/** Message formatter * @param messageKey the message key * @param arg1 the first argument * @return the resolved message text */ public String msg (String messageKey, Object arg1) { assertBundle (messageKey); return getMessage (bundle, messageKey, arg1); }
/** Message formatter * @param messageKey the message key * @param args the array of arguments * @return the resolved message text */ public String msg (String messageKey, Object[] args) { assertBundle (messageKey); return getMessage (bundle, messageKey, args); }