org.nakedobjects.persistence.sql
Class SimpleSqlObjectMapper
java.lang.Object
org.nakedobjects.persistence.sql.DatabaseAccess
org.nakedobjects.persistence.sql.SimpleSqlObjectMapper
- All Implemented Interfaces:
- SqlObjectMapper
- Direct Known Subclasses:
- AutoSqlObjectMapper, SqlTableMapper
- public class SimpleSqlObjectMapper
- extends DatabaseAccess
- implements SqlObjectMapper
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
nakedClass
protected NakedClass nakedClass
keyColumn
protected java.lang.String keyColumn
table
protected java.lang.String table
columns
protected java.lang.String[] columns
fields
protected Field[] fields
polymorphicReferences
protected boolean polymorphicReferences
SimpleSqlObjectMapper
public SimpleSqlObjectMapper(NakedClass nakedClass,
SqlObjectStore store,
Field[] fields,
java.lang.String table,
java.lang.String[] columns,
java.lang.String keyColumn,
boolean polymorphicReferences)
SimpleSqlObjectMapper
public SimpleSqlObjectMapper(SqlObjectStore store)
isFirstInstance
public boolean isFirstInstance(NakedObject pattern,
NakedObject instance)
throws ObjectStoreException
- Specified by:
isFirstInstance in interface SqlObjectMapper
- Throws:
ObjectStoreException
isLastInstance
public boolean isLastInstance(NakedObject pattern,
NakedObject instance)
throws ObjectStoreException
- Specified by:
isLastInstance in interface SqlObjectMapper
- Throws:
ObjectStoreException
getNakedClass
public NakedClass getNakedClass()
- Specified by:
getNakedClass in interface SqlObjectMapper
delete
public void delete(NakedObject object)
throws ObjectStoreException
- Specified by:
delete in interface SqlObjectMapper
- Throws:
ObjectStoreException
hasInstances
public boolean hasInstances()
throws ObjectStoreException
- Specified by:
hasInstances in interface SqlObjectMapper
- Throws:
ObjectStoreException
insert
public void insert(NakedObject object,
long id)
throws ObjectStoreException
- Specified by:
insert in interface SqlObjectMapper
- Throws:
ObjectStoreException
nextInstances
public java.util.Vector nextInstances(NakedObject pattern,
NakedObject fromInstance,
int count)
throws ObjectStoreException
- Specified by:
nextInstances in interface SqlObjectMapper
- Throws:
ObjectStoreException
numberOfInstances
public int numberOfInstances(NakedObject pattern)
throws ObjectStoreException
- Specified by:
numberOfInstances in interface SqlObjectMapper
- Throws:
ObjectStoreException
previousInstances
public java.util.Vector previousInstances(NakedObject pattern,
NakedObject toInstance,
int count)
throws ObjectStoreException
- Specified by:
previousInstances in interface SqlObjectMapper
- Throws:
ObjectStoreException
readObject
public NakedObject readObject(NakedObject object)
throws ObjectNotFoundException,
ObjectStoreException
- Specified by:
readObject in interface SqlObjectMapper
- Throws:
ObjectNotFoundException
ObjectStoreException
toString
public java.lang.String toString()
update
public void update(NakedObject object)
throws ObjectStoreException
- Specified by:
update in interface SqlObjectMapper
- Throws:
ObjectStoreException
withKey
protected java.lang.String withKey(NakedObject object)