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.
|
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(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(Class<T> type,
List<Map<String,Object>> rows)
Creates and INSERTs a batch of new entities represented by
rows of the given type. |
<T extends RawEntity<K>,K> |
EntityManager.create(Class<T> type,
Map<String,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,
Class<T> type,
K key) |
protected <T extends RawEntity<K>,K> |
DatabaseProvider.executeInsertReturningKey(EntityManager manager,
Connection conn,
Class<T> entityType,
Class<K> pkType,
String pkField,
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(Class<T> type)
Returns all entities of the given type.
|
<T extends RawEntity<K>,K> |
EntityManager.find(Class<T> type,
Query query)
Selects all entities matching the given type and
Query . |
<T extends RawEntity<K>,K> |
EntityManager.find(Class<T> type,
String criteria,
Object... parameters)
Convenience method to select all entities of the given type with the specified, parameterized criteria.
|
<T extends RawEntity<K>,K> |
EntityManager.find(Class<T> type,
String field,
Query query)
Selects all entities of the specified type which match the given
Query . |
<T extends RawEntity<K>,K> |
EntityManager.findSingleEntity(Class<T> type,
String criteria,
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(Class<T> type,
String keyField,
String sql,
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(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(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> |
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.insertBatch(EntityManager manager,
Connection conn,
Class<T> entityType,
Class<K> pkType,
String pkField,
boolean pkIdentity,
String table,
List<Map<String,Object>> rows)
Inserts a batch of rows.
|
<T extends RawEntity<K>,K> |
DatabaseProvider.insertReturningKey(EntityManager manager,
Connection conn,
Class<T> entityType,
Class<K> pkType,
String pkField,
boolean pkIdentity,
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(Class<T> type) |
<T extends RawEntity<K>,K> |
EntityManager.stream(Class<T> type,
EntityStreamCallback<T,K> streamCallback)
Optimised read for large datasets.
|
<T extends RawEntity<K>,K> |
EntityManager.stream(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(Class<T> type)
Returns all entities of the given type.
|
<T extends RawEntity<K>,K> |
EntityManager.find(Class<T> type,
Query query)
Selects all entities matching the given type and
Query . |
<T extends RawEntity<K>,K> |
EntityManager.find(Class<T> type,
String criteria,
Object... parameters)
Convenience method to select all entities of the given type with the specified, parameterized criteria.
|
<T extends RawEntity<K>,K> |
EntityManager.find(Class<T> type,
String field,
Query query)
Selects all entities of the specified type which match the given
Query . |
<T extends RawEntity<K>,K> |
EntityManager.findWithSQL(Class<T> type,
String keyField,
String sql,
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(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) |
Modifier and Type | Method and Description |
---|---|
Map<Class<? extends RawEntity<?>>,String> |
Query.getJoins() |
Class<? extends RawEntity<?>> |
Query.getTableType() |
Class<? extends RawEntity<?>> |
PolymorphicTypeMapper.invert(Class<? extends RawEntity<?>> parent,
String type)
Retrieves the entity type which corresponds to the given polymorphic type
flag value as a subtype of the specified parent entity type.
|
Class<? extends RawEntity<?>> |
DefaultPolymorphicTypeMapper.invert(Class<? extends RawEntity<?>> parent,
String type) |
Modifier and Type | Method and Description |
---|---|
void |
EntityManager.delete(RawEntity<?>... entities)
Deletes the specified entities from the database.
|
boolean |
ReadOnlyEntityProxy.equalsImpl(RawEntity<K> proxy,
Object obj) |
boolean |
EntityProxy.equalsImpl(RawEntity<K> proxy,
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 |
EntityProxy.save(RawEntity entity) |
Modifier and Type | Method and Description |
---|---|
Query |
Query.alias(Class<? extends RawEntity<?>> table,
String alias) |
String |
PolymorphicTypeMapper.convert(Class<? extends RawEntity<?>> type)
Retrieves the polymorphic type flag value which corresponds to the
specified type.
|
String |
DefaultPolymorphicTypeMapper.convert(Class<? extends RawEntity<?>> type) |
<K> int |
EntityManager.count(Class<? extends RawEntity<K>> type)
Counts all entities of the specified type.
|
<K> int |
EntityManager.count(Class<? extends RawEntity<K>> type,
Query query)
Counts all entities of the specified type matching the given
Query instance. |
<K> int |
EntityManager.count(Class<? extends RawEntity<K>> type,
String criteria,
Object... parameters)
Counts all entities of the specified type matching the given criteria and parameters.
|
<K> int |
EntityManager.deleteWithSQL(Class<? extends RawEntity<K>> type,
String criteria,
Object... parameters)
Deletes rows from the table corresponding to
type . |
Query |
Query.from(Class<? extends RawEntity<?>> tableType) |
String |
Query.getAlias(Class<? extends RawEntity<?>> table) |
static String[] |
Common.getMappingFields(FieldNameConverter converter,
Class<? extends RawEntity<?>> from,
Class<? extends RawEntity<?>> to)
Deprecated.
|
static String[] |
Common.getMappingFields(FieldNameConverter converter,
Class<? extends RawEntity<?>> from,
Class<? extends RawEntity<?>> to)
Deprecated.
|
static String[] |
Common.getPolymorphicFieldNames(FieldNameConverter converter,
Class<? extends RawEntity<?>> from,
Class<? extends RawEntity<?>> to)
Deprecated.
|
static String[] |
Common.getPolymorphicFieldNames(FieldNameConverter converter,
Class<? extends RawEntity<?>> from,
Class<? extends RawEntity<?>> to)
Deprecated.
|
static <K> Class<K> |
Common.getPrimaryKeyClassType(Class<? extends RawEntity<K>> type) |
static String |
Common.getPrimaryKeyField(Class<? extends RawEntity<?>> type,
FieldNameConverter converter) |
static <K> TypeInfo<K> |
Common.getPrimaryKeyType(TypeManager typeManager,
Class<? extends RawEntity<K>> type) |
static List<String> |
Common.getSearchableFields(EntityManager manager,
Class<? extends RawEntity<?>> type) |
static Set<Method> |
Common.getValueFieldsMethods(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<String> |
Common.getValueFieldsNames(EntityInfo<? extends RawEntity<?>,?> entityInfo,
FieldNameConverter converter)
Gets all the names of fields of an entity that correspond to a value field.
|
Class<? extends RawEntity<?>> |
PolymorphicTypeMapper.invert(Class<? extends RawEntity<?>> parent,
String type)
Retrieves the entity type which corresponds to the given polymorphic type
flag value as a subtype of the specified parent entity type.
|
Class<? extends RawEntity<?>> |
DefaultPolymorphicTypeMapper.invert(Class<? extends RawEntity<?>> parent,
String type) |
Query |
Query.join(Class<? extends RawEntity<?>> join) |
Query |
Query.join(Class<? extends RawEntity<?>> join,
String on) |
void |
Query.setJoins(Map<Class<? extends RawEntity<?>>,String> joins) |
void |
Query.setTableType(Class<? extends RawEntity<?>> tableType) |
protected <K> String |
Query.toSQL(EntityInfo<? extends RawEntity<K>,K> entityInfo,
DatabaseProvider provider,
TableNameConverter converter,
boolean count) |
Constructor and Description |
---|
DefaultPolymorphicTypeMapper(Map<Class<? extends RawEntity<?>>,String> mappings)
Creates a new instance with the specified {type => flag} mappings.
|
Modifier and Type | Method and Description |
---|---|
String |
AtlassianTableNameConverter.getName(Class<? extends RawEntity<?>> entityClass) |
Modifier and Type | Method and Description |
---|---|
protected <T extends RawEntity<K>,K> |
PostgreSQLDatabaseProvider.executeInsertReturningKey(EntityManager manager,
Connection conn,
Class<T> entityType,
Class<K> pkType,
String pkField,
String sql,
DBParam... params) |
protected <T extends RawEntity<K>,K> |
OracleDatabaseProvider.executeInsertReturningKey(EntityManager manager,
Connection conn,
Class<T> entityType,
Class<K> pkType,
String pkField,
String sql,
DBParam... params) |
protected <T extends RawEntity<K>,K> |
HSQLDatabaseProvider.executeInsertReturningKey(EntityManager manager,
Connection conn,
Class<T> entityType,
Class<K> pkType,
String pkField,
String sql,
DBParam... params) |
<T extends RawEntity<K>,K> |
HSQLDatabaseProvider.insertBatch(EntityManager manager,
Connection conn,
Class<T> entityType,
Class<K> pkType,
String pkField,
boolean pkIdentity,
String table,
List<Map<String,Object>> rows)
HSQL doesn't support batch insert.
|
<T extends RawEntity<K>,K> |
SQLServerDatabaseProvider.insertReturningKey(EntityManager manager,
Connection conn,
Class<T> entityType,
Class<K> pkType,
String pkField,
boolean pkIdentity,
String table,
DBParam... params) |
<T extends RawEntity<K>,K> |
PostgreSQLDatabaseProvider.insertReturningKey(EntityManager manager,
Connection conn,
Class<T> entityType,
Class<K> pkType,
String pkField,
boolean pkIdentity,
String table,
DBParam... params) |
<T extends RawEntity<K>,K> |
HSQLDatabaseProvider.insertReturningKey(EntityManager manager,
Connection conn,
Class<T> entityType,
Class<K> pkType,
String pkField,
boolean pkIdentity,
String table,
DBParam... params) |
Modifier and Type | Method and Description |
---|---|
String |
TableNameConverter.getName(Class<? extends RawEntity<?>> clazz)
Generates a table name to correspond with the specified class.
|
String |
TableAnnotationTableNameConverter.getName(Class<? extends RawEntity<?>> entityClass)
Gets the name of the table either from the
Table annotation if present or from the
delegate . |
String |
CanonicalClassNameTableNameConverter.getName(Class<? extends RawEntity<?>> entityClass) |
String |
CachingTableNameConverter.getName(Class<? extends RawEntity<?>> entityClass) |
static DDLField[] |
SchemaGenerator.parseFields(DatabaseProvider provider,
FieldNameConverter fieldConverter,
Class<? extends RawEntity<?>> clazz)
Not intended for public usage.
|
static DDLTable |
SchemaGenerator.parseInterface(DatabaseProvider provider,
NameConverters nameConverters,
Class<? extends RawEntity<?>> clazz)
Not intended for public use.
|
Modifier and Type | Method and Description |
---|---|
boolean |
DatabaseMetaDataReaderImpl.isTablePresent(DatabaseMetaData databaseMetaData,
Class<? extends RawEntity<?>> type) |
boolean |
DatabaseMetaDataReader.isTablePresent(DatabaseMetaData databaseMetaData,
Class<? extends RawEntity<?>> type)
Checks if the table corresponding to given type exists in the database.
|
Modifier and Type | Method and Description |
---|---|
Set<DDLIndex> |
IndexParser.parseIndexes(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(Class<T> type) |
<T extends RawEntity<K>,K> |
EntityInfoResolverWrapper.resolve(Class<T> type) |
<T extends RawEntity<K>,K> |
EntityInfoResolver.resolve(Class<T> type) |
<T extends RawEntity<K>,K> |
CachingEntityInfoResolver.resolve(Class<T> type) |
Modifier and Type | Method and Description |
---|---|
static <K,T extends RawEntity<K>> |
LogicalTypes.entityType(Class<T> entityClass,
TypeInfo<K> primaryKeyTypeInfo,
Class<K> primaryKeyClass) |
Copyright © 2007–2020 Atlassian. All rights reserved.