public abstract class AbstractAnyDAO<A extends Any<?>> extends AbstractDAO<A> implements AnyDAO<A>
Modifier and Type | Field and Description |
---|---|
protected AnyUtilsFactory |
anyUtilsFactory |
protected DerSchemaDAO |
derSchemaDAO |
protected DynRealmDAO |
dynRealmDAO |
protected PlainSchemaDAO |
plainSchemaDAO |
LOG
DEFAULT_PAGE_SIZE
Constructor and Description |
---|
AbstractAnyDAO() |
Modifier and Type | Method and Description |
---|---|
protected AnyUtils |
anyUtils() |
A |
authFind(String key) |
protected Date |
convert(LocalDateTime localDateTime) |
void |
delete(String key) |
A |
find(String key) |
protected List<String> |
findAllKeys(String table,
int page,
int itemsPerPage) |
<S extends Schema> |
findAllowedSchemas(A any,
Class<S> reference) |
List<A> |
findByDerAttrValue(DerSchema schema,
String value,
boolean ignoreCaseMatch)
Find any objects by derived attribute value.
|
List<A> |
findByKeys(List<String> keys) |
Optional<A> |
findByPlainAttrUniqueValue(PlainSchema schema,
PlainAttrUniqueValue attrUniqueValue,
boolean ignoreCaseMatch) |
List<A> |
findByPlainAttrValue(PlainSchema schema,
PlainAttrValue attrValue,
boolean ignoreCaseMatch) |
List<A> |
findByResource(ExternalResource resource) |
List<String> |
findDynRealms(String key) |
protected String |
findKey(String name,
String table) |
protected Date |
findLastChange(String key,
String table) |
SearchCond |
getAllMatchingCond() |
protected abstract AnyUtils |
init() |
A |
save(A any) |
protected abstract void |
securityChecks(A any) |
clear, detach, entityManager, entityManagerFactory, refresh
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
count, delete, findAll, findAllKeys, findAllResourceKeys, findKey, findLastChange
@Autowired protected AnyUtilsFactory anyUtilsFactory
@Autowired @Lazy protected PlainSchemaDAO plainSchemaDAO
@Autowired @Lazy protected DerSchemaDAO derSchemaDAO
@Autowired @Lazy protected DynRealmDAO dynRealmDAO
protected abstract AnyUtils init()
protected AnyUtils anyUtils()
protected Date convert(LocalDateTime localDateTime)
protected abstract void securityChecks(A any)
@Transactional(readOnly=true) public List<A> findByKeys(List<String> keys)
findByKeys
in interface AnyDAO<A extends Any<?>>
@Transactional(readOnly=true) public A authFind(String key)
@Transactional(readOnly=true) public A find(String key)
public List<A> findByPlainAttrValue(PlainSchema schema, PlainAttrValue attrValue, boolean ignoreCaseMatch)
findByPlainAttrValue
in interface AnyDAO<A extends Any<?>>
public Optional<A> findByPlainAttrUniqueValue(PlainSchema schema, PlainAttrUniqueValue attrUniqueValue, boolean ignoreCaseMatch)
findByPlainAttrUniqueValue
in interface AnyDAO<A extends Any<?>>
public List<A> findByDerAttrValue(DerSchema schema, String value, boolean ignoreCaseMatch)
AnyDAO
findByDerAttrValue
in interface AnyDAO<A extends Any<?>>
schema
- derived schemavalue
- derived attribute valueignoreCaseMatch
- whether comparison for string values should take case into account or notpublic List<A> findByResource(ExternalResource resource)
findByResource
in interface AnyDAO<A extends Any<?>>
public SearchCond getAllMatchingCond()
getAllMatchingCond
in interface AnyDAO<A extends Any<?>>
@Transactional(propagation=REQUIRES_NEW, readOnly=true) public <S extends Schema> AllowedSchemas<S> findAllowedSchemas(A any, Class<S> reference)
findAllowedSchemas
in interface AnyDAO<A extends Any<?>>
@Transactional(readOnly=true) public List<String> findDynRealms(String key)
findDynRealms
in interface AnyDAO<A extends Any<?>>
Copyright © 2010–2023 The Apache Software Foundation. All rights reserved.