| com.methodhead.persistable.Persistable com.methodhead.persistable.KeyedPersistable com.methodhead.aikp.AutoIntKeyPersistable
All known Subclasses: com.methodhead.reg.User, com.methodhead.sitecontext.SiteContextAikp, com.methodhead.shim.HtmlFragment, com.methodhead.shim.Page, com.methodhead.reg.Contact, com.methodhead.sitecontext.SiteContext,
AutoIntKeyPersistable | abstract public class AutoIntKeyPersistable extends KeyedPersistable (Code) | | Extends KeyedPersistable to generate new IntKeys
automatically. Ids are managed using a simple database table; make sure
this table exists in the database:
CREATE TABLE mh_id (
name VARCHAR(32),
value INT
);
saveNew(Key) is overridden and made protected. Instead, use
saveNew() which generates the id itself.
|
AutoIntKeyPersistable | public AutoIntKeyPersistable(DynaClass dynaClass)(Code) | | |
loadAll | public static List loadAll(DynaClass dynaClass, String whereClause, String orderByClause)(Code) | | See super class's documentation.
|
newKey | protected synchronized IntKey newKey(String name)(Code) | | Returns a new id for the specified key.
|
saveNew | public void saveNew()(Code) | | Saves the persistable, automatically generating a new id for it.
|
Fields inherited from com.methodhead.persistable.KeyedPersistable | protected Key key_(Code)(Java Doc)
|
Methods inherited from com.methodhead.persistable.Persistable | public static void deleteAll(DynaClass dynaClass, String whereClause) throws PersistableException(Code)(Java Doc) public void deleteAll(String whereClause) throws PersistableException(Code)(Java Doc) public boolean getBoolean(String property)(Code)(Java Doc) public Date getDate(String property)(Code)(Java Doc) public double getDouble(String property)(Code)(Java Doc) public int getInt(String property)(Code)(Java Doc) public static String getSqlLiteral(String value)(Code)(Java Doc) public static String getSqlLiteral(Boolean value)(Code)(Java Doc) public static String getSqlLiteral(Date value)(Code)(Java Doc) protected String getSqlLiteral(DynaProperty dynaProperty)(Code)(Java Doc) public String getString(String property)(Code)(Java Doc) public void load(String whereClause)(Code)(Java Doc) public static List loadAll(DynaClass dynaClass, String whereClause, String orderByClause)(Code)(Java Doc) public List loadAll(String whereClause, String orderByClause)(Code)(Java Doc) public void save(String whereClause) throws PersistableException(Code)(Java Doc) public void saveNew()(Code)(Java Doc) public void setAsObject(String property, Object value)(Code)(Java Doc) public void setAsString(String property, String value)(Code)(Java Doc) public void setBoolean(String property, boolean value)(Code)(Java Doc) public void setDate(String property, Date value)(Code)(Java Doc) public void setDouble(String property, double value)(Code)(Java Doc) public void setInt(String property, int value)(Code)(Java Doc) protected static void setProperty(DynaBean persistable, DynaProperty dynaProperty, ResultSet rs)(Code)(Java Doc) public void setString(String property, String value)(Code)(Java Doc)
|
|
|