Package | Description |
---|---|
net.java.ao | |
net.java.ao.atlassian | |
net.java.ao.db | |
net.java.ao.schema | |
net.java.ao.schema.helper | |
net.java.ao.schema.index | |
net.java.ao.schema.info | |
net.java.ao.types |
Modifier and Type | Class and Description |
---|---|
class |
EntityProxy<T extends RawEntity<K>,K> |
interface |
EntityStreamCallback<T extends RawEntity<K>,K> |
class |
ReadOnlyEntityProxy<T extends RawEntity<K>,K>
A read-only representation of a database row proxy, mapped to the specified Entity type.
|
interface |
RelatedEntity<T extends RelatedEntity<T> & RawEntity<?>>
A superinterface for entities which are related to each other using
Lucene heuristics.
|
Modifier and Type | Interface and Description |
---|---|
interface |
Entity
A specific extension of
RawEntity providing the Entity.getID()
method. |
Modifier and Type | Method and Description |
---|---|
<T extends RawEntity<K>,K> |
EntityManager.create(java.lang.Class<T> type,
DBParam... params)
Creates a new entity of the specified type with the optionally specified
initial parameters.
|
<T extends RawEntity<K>,K> |
EntityManager.create(java.lang.Class<T> type,
java.util.Map<java.lang.String,java.lang.Object> params)
Creates and INSERTs a new entity of the specified type with the given map of parameters.
|
static <T extends RawEntity<K>,K> |
Common.createPeer(EntityManager manager,
java.lang.Class<T> type,
K key) |
protected <T extends RawEntity<K>,K> |
DatabaseProvider.executeInsertReturningKey(EntityManager manager,
java.sql.Connection conn,
java.lang.Class<T> entityType,
java.lang.Class<K> pkType,
java.lang.String pkField,
java.lang.String sql,
DBParam... params)
Delegate method to execute an INSERT statement returning any auto-generated
primary key values.
|
<T extends RawEntity<K>,K> |
EntityManager.find(java.lang.Class<T> type)
Returns all entities of the given type.
|
<T extends RawEntity<K>,K> |
EntityManager.find(java.lang.Class<T> type,
Query query)
Selects all entities matching the given type and
Query . |
<T extends RawEntity<K>,K> |
EntityManager.find(java.lang.Class<T> type,
java.lang.String criteria,
java.lang.Object... parameters)
Convenience method to select all entities of the given type with the specified, parameterized criteria.
|
<T extends RawEntity<K>,K> |
EntityManager.find(java.lang.Class<T> type,
java.lang.String field,
Query query)
Selects all entities of the specified type which match the given
Query . |
<T extends RawEntity<K>,K> |
EntityManager.findSingleEntity(java.lang.Class<T> type,
java.lang.String criteria,
java.lang.Object... parameters)
Convenience method to select a single entity of the given type with the specified, parameterized criteria.
|
<T extends RawEntity<K>,K> |
EntityManager.findWithSQL(java.lang.Class<T> type,
java.lang.String keyField,
java.lang.String sql,
java.lang.Object... parameters)
Executes the specified SQL and extracts the given key field, wrapping each row into a instance of the
specified type.
|
<T extends RawEntity<K>,K> |
EntityManager.get(java.lang.Class<T> type,
K... keys)
Returns an array of entities of the specified type corresponding to the
varargs primary keys.
|
<T extends RawEntity<K>,K> |
EntityManager.get(java.lang.Class<T> type,
K key)
Cleverly overloaded method to return a single entity of the specified type rather than an array in the case where
only one ID is passed.
|
protected <T extends RawEntity<K>,K> |
SearchableEntityManager.getAndInstantiate(EntityInfo<T,K> entityInfo,
K key) |
protected <T extends RawEntity<K>,K> |
EntityManager.getAndInstantiate(EntityInfo<T,K> entityInfo,
K key)
Creates a new instance of the entity of the specified type corresponding to the given primary key.
|
<X extends RawEntity<T>> |
RawEntity.getEntityType()
Returns the actual
Class instance which corresponds to the
original entity interface. |
<T extends RawEntity<K>,K> |
DatabaseProvider.insertReturningKey(EntityManager manager,
java.sql.Connection conn,
java.lang.Class<T> entityType,
java.lang.Class<K> pkType,
java.lang.String pkField,
boolean pkIdentity,
java.lang.String table,
DBParam... params)
Generates an INSERT statement to be used to create a new row in the
database, returning the primary key value.
|
protected <T extends RawEntity<K>,K> |
EntityManager.peer(EntityInfo<T,K> entityInfo,
K... keys) |
protected <T extends RawEntity<K>,K> |
EntityManager.peer(EntityInfo<T,K> entityInfo,
K key) |
protected <T extends RawEntity<K>,K> |
EntityManager.resolveEntityInfo(java.lang.Class<T> type) |
<T extends RawEntity<K>,K> |
SearchableEntityManager.search(java.lang.Class<T> type,
java.lang.String strQuery)
Runs a Lucene full-text search on the specified entity type with the given
query.
|
<T extends RawEntity<K>,K> |
EntityManager.stream(java.lang.Class<T> type,
EntityStreamCallback<T,K> streamCallback)
Optimised read for large datasets.
|
<T extends RawEntity<K>,K> |
EntityManager.stream(java.lang.Class<T> type,
Query query,
EntityStreamCallback<T,K> streamCallback)
Selects all entities of the given type and feeds them to the callback, one by one.
|
Modifier and Type | Method and Description |
---|---|
<T extends RawEntity<K>,K> |
EntityManager.find(java.lang.Class<T> type)
Returns all entities of the given type.
|
<T extends RawEntity<K>,K> |
EntityManager.find(java.lang.Class<T> type,
Query query)
Selects all entities matching the given type and
Query . |
<T extends RawEntity<K>,K> |
EntityManager.find(java.lang.Class<T> type,
java.lang.String criteria,
java.lang.Object... parameters)
Convenience method to select all entities of the given type with the specified, parameterized criteria.
|
<T extends RawEntity<K>,K> |
EntityManager.find(java.lang.Class<T> type,
java.lang.String field,
Query query)
Selects all entities of the specified type which match the given
Query . |
<T extends RawEntity<K>,K> |
EntityManager.findWithSQL(java.lang.Class<T> type,
java.lang.String keyField,
java.lang.String sql,
java.lang.Object... parameters)
Executes the specified SQL and extracts the given key field, wrapping each row into a instance of the
specified type.
|
<T extends RawEntity<K>,K> |
EntityManager.get(java.lang.Class<T> type,
K... keys)
Returns an array of entities of the specified type corresponding to the
varargs primary keys.
|
protected <T extends RawEntity<K>,K> |
EntityManager.peer(EntityInfo<T,K> entityInfo,
K... keys) |
<T extends RawEntity<K>,K> |
SearchableEntityManager.search(java.lang.Class<T> type,
java.lang.String strQuery)
Runs a Lucene full-text search on the specified entity type with the given
query.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.Class<? extends RawEntity<?>>,java.lang.String> |
Query.getJoins() |
java.lang.Class<? extends RawEntity<?>> |
Query.getTableType() |
java.lang.Class<? extends RawEntity<?>> |
PolymorphicTypeMapper.invert(java.lang.Class<? extends RawEntity<?>> parent,
java.lang.String type)
Retrieves the entity type which corresponds to the given polymorphic type
flag value as a subtype of the specified parent entity type.
|
java.lang.Class<? extends RawEntity<?>> |
DefaultPolymorphicTypeMapper.invert(java.lang.Class<? extends RawEntity<?>> parent,
java.lang.String type) |
Modifier and Type | Method and Description |
---|---|
void |
SearchableEntityManager.addToIndex(RawEntity<?> entity)
Adds the entity instance to the index.
|
void |
SearchableEntityManager.delete(RawEntity<?>... entities) |
void |
EntityManager.delete(RawEntity<?>... entities)
Deletes the specified entities from the database.
|
boolean |
ReadOnlyEntityProxy.equalsImpl(RawEntity<K> proxy,
java.lang.Object obj) |
boolean |
EntityProxy.equalsImpl(RawEntity<K> proxy,
java.lang.Object obj) |
void |
EntityManager.flush(RawEntity<?>... entities)
Deprecated.
since 0.25. Entities and values now no longer cached.
|
static <K> K |
Common.getPrimaryKeyValue(RawEntity<K> entity) |
void |
SearchableEntityManager.removeFromIndex(RawEntity<?> entity)
Removes the specified entity from the Lucene index.
|
void |
EntityProxy.save(RawEntity entity) |
Modifier and Type | Method and Description |
---|---|
Query |
Query.alias(java.lang.Class<? extends RawEntity<?>> table,
java.lang.String alias) |
java.lang.String |
PolymorphicTypeMapper.convert(java.lang.Class<? extends RawEntity<?>> type)
Retrieves the polymorphic type flag value which corresponds to the
specified type.
|
java.lang.String |
DefaultPolymorphicTypeMapper.convert(java.lang.Class<? extends RawEntity<?>> type) |
<K> int |
EntityManager.count(java.lang.Class<? extends RawEntity<K>> type)
Counts all entities of the specified type.
|
<K> int |
EntityManager.count(java.lang.Class<? extends RawEntity<K>> type,
Query query)
Counts all entities of the specified type matching the given
Query instance. |
<K> int |
EntityManager.count(java.lang.Class<? extends RawEntity<K>> type,
java.lang.String criteria,
java.lang.Object... parameters)
Counts all entities of the specified type matching the given criteria and parameters.
|
<K> int |
EntityManager.deleteWithSQL(java.lang.Class<? extends RawEntity<K>> type,
java.lang.String criteria,
java.lang.Object... parameters)
Deletes rows from the table corresponding to
type . |
Query |
Query.from(java.lang.Class<? extends RawEntity<?>> tableType) |
java.lang.String |
Query.getAlias(java.lang.Class<? extends RawEntity<?>> table) |
static java.lang.String[] |
Common.getMappingFields(FieldNameConverter converter,
java.lang.Class<? extends RawEntity<?>> from,
java.lang.Class<? extends RawEntity<?>> to)
Deprecated.
|
static java.lang.String[] |
Common.getMappingFields(FieldNameConverter converter,
java.lang.Class<? extends RawEntity<?>> from,
java.lang.Class<? extends RawEntity<?>> to)
Deprecated.
|
static java.lang.String[] |
Common.getPolymorphicFieldNames(FieldNameConverter converter,
java.lang.Class<? extends RawEntity<?>> from,
java.lang.Class<? extends RawEntity<?>> to)
Deprecated.
|
static java.lang.String[] |
Common.getPolymorphicFieldNames(FieldNameConverter converter,
java.lang.Class<? extends RawEntity<?>> from,
java.lang.Class<? extends RawEntity<?>> to)
Deprecated.
|
static <K> java.lang.Class<K> |
Common.getPrimaryKeyClassType(java.lang.Class<? extends RawEntity<K>> type) |
static java.lang.String |
Common.getPrimaryKeyField(java.lang.Class<? extends RawEntity<?>> type,
FieldNameConverter converter) |
static <K> TypeInfo<K> |
Common.getPrimaryKeyType(TypeManager typeManager,
java.lang.Class<? extends RawEntity<K>> type) |
static java.util.List<java.lang.String> |
Common.getSearchableFields(EntityManager manager,
java.lang.Class<? extends RawEntity<?>> type) |
static java.util.Set<java.lang.reflect.Method> |
Common.getValueFieldsMethods(java.lang.Class<? extends RawEntity<?>> entity,
FieldNameConverter converter)
Gets all the methods of an entity that correspond to a value field.
|
static com.google.common.collect.ImmutableSet<java.lang.String> |
Common.getValueFieldsNames(EntityInfo<? extends RawEntity<?>,?> entityInfo,
FieldNameConverter converter)
Gets all the names of fields of an entity that correspond to a value field.
|
java.lang.Class<? extends RawEntity<?>> |
PolymorphicTypeMapper.invert(java.lang.Class<? extends RawEntity<?>> parent,
java.lang.String type)
Retrieves the entity type which corresponds to the given polymorphic type
flag value as a subtype of the specified parent entity type.
|
java.lang.Class<? extends RawEntity<?>> |
DefaultPolymorphicTypeMapper.invert(java.lang.Class<? extends RawEntity<?>> parent,
java.lang.String type) |
Query |
Query.join(java.lang.Class<? extends RawEntity<?>> join) |
Query |
Query.join(java.lang.Class<? extends RawEntity<?>> join,
java.lang.String on) |
void |
Query.setJoins(java.util.Map<java.lang.Class<? extends RawEntity<?>>,java.lang.String> joins) |
void |
Query.setTableType(java.lang.Class<? extends RawEntity<?>> tableType) |
protected <K> java.lang.String |
Query.toSQL(EntityInfo<? extends RawEntity<K>,K> entityInfo,
DatabaseProvider provider,
TableNameConverter converter,
boolean count) |
Constructor and Description |
---|
DefaultPolymorphicTypeMapper(java.util.Map<java.lang.Class<? extends RawEntity<?>>,java.lang.String> mappings)
Creates a new instance with the specified {type => flag} mappings.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
AtlassianTableNameConverter.getName(java.lang.Class<? extends RawEntity<?>> entityClass) |
Modifier and Type | Method and Description |
---|---|
protected <T extends RawEntity<K>,K> |
PostgreSQLDatabaseProvider.executeInsertReturningKey(EntityManager manager,
java.sql.Connection conn,
java.lang.Class<T> entityType,
java.lang.Class<K> pkType,
java.lang.String pkField,
java.lang.String sql,
DBParam... params) |
protected <T extends RawEntity<K>,K> |
OracleDatabaseProvider.executeInsertReturningKey(EntityManager manager,
java.sql.Connection conn,
java.lang.Class<T> entityType,
java.lang.Class<K> pkType,
java.lang.String pkField,
java.lang.String sql,
DBParam... params) |
protected <T extends RawEntity<K>,K> |
HSQLDatabaseProvider.executeInsertReturningKey(EntityManager manager,
java.sql.Connection conn,
java.lang.Class<T> entityType,
java.lang.Class<K> pkType,
java.lang.String pkField,
java.lang.String sql,
DBParam... params) |
<T extends RawEntity<K>,K> |
SQLServerDatabaseProvider.insertReturningKey(EntityManager manager,
java.sql.Connection conn,
java.lang.Class<T> entityType,
java.lang.Class<K> pkType,
java.lang.String pkField,
boolean pkIdentity,
java.lang.String table,
DBParam... params) |
<T extends RawEntity<K>,K> |
PostgreSQLDatabaseProvider.insertReturningKey(EntityManager manager,
java.sql.Connection conn,
java.lang.Class<T> entityType,
java.lang.Class<K> pkType,
java.lang.String pkField,
boolean pkIdentity,
java.lang.String table,
DBParam... params) |
<T extends RawEntity<K>,K> |
HSQLDatabaseProvider.insertReturningKey(EntityManager manager,
java.sql.Connection conn,
java.lang.Class<T> entityType,
java.lang.Class<K> pkType,
java.lang.String pkField,
boolean pkIdentity,
java.lang.String table,
DBParam... params) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
TableNameConverter.getName(java.lang.Class<? extends RawEntity<?>> clazz)
Generates a table name to correspond with the specified class.
|
java.lang.String |
TableAnnotationTableNameConverter.getName(java.lang.Class<? extends RawEntity<?>> entityClass)
Gets the name of the table either from the
Table annotation if present or from the
delegate . |
java.lang.String |
CanonicalClassNameTableNameConverter.getName(java.lang.Class<? extends RawEntity<?>> entityClass) |
java.lang.String |
CachingTableNameConverter.getName(java.lang.Class<? extends RawEntity<?>> entityClass) |
static DDLField[] |
SchemaGenerator.parseFields(DatabaseProvider provider,
FieldNameConverter fieldConverter,
java.lang.Class<? extends RawEntity<?>> clazz)
Not intended for public usage.
|
static DDLTable |
SchemaGenerator.parseInterface(DatabaseProvider provider,
NameConverters nameConverters,
java.lang.Class<? extends RawEntity<?>> clazz)
Not intended for public use.
|
Modifier and Type | Method and Description |
---|---|
boolean |
DatabaseMetaDataReaderImpl.isTablePresent(java.sql.DatabaseMetaData databaseMetaData,
java.lang.Class<? extends RawEntity<?>> type) |
boolean |
DatabaseMetaDataReader.isTablePresent(java.sql.DatabaseMetaData databaseMetaData,
java.lang.Class<? extends RawEntity<?>> type)
Checks if the table corresponding to given type exists in the database.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<DDLIndex> |
IndexParser.parseIndexes(java.lang.Class<? extends RawEntity<?>> clazz) |
Modifier and Type | Interface and Description |
---|---|
interface |
EntityInfo<T extends RawEntity<K>,K>
|
Modifier and Type | Method and Description |
---|---|
<T extends RawEntity<K>,K> |
SimpleEntityInfoResolver.resolve(java.lang.Class<T> type) |
<T extends RawEntity<K>,K> |
EntityInfoResolverWrapper.resolve(java.lang.Class<T> type) |
<T extends RawEntity<K>,K> |
EntityInfoResolver.resolve(java.lang.Class<T> type) |
<T extends RawEntity<K>,K> |
CachingEntityInfoResolver.resolve(java.lang.Class<T> type) |
Modifier and Type | Method and Description |
---|---|
static <K,T extends RawEntity<K>> |
LogicalTypes.entityType(java.lang.Class<T> entityClass,
TypeInfo<K> primaryKeyTypeInfo,
java.lang.Class<K> primaryKeyClass) |
Copyright © 2007-2020 Atlassian. All Rights Reserved.