Class AbstractAnyDAO<A extends Any<?>>
- java.lang.Object
-
- org.apache.syncope.core.persistence.jpa.dao.AbstractDAO<A>
-
- org.apache.syncope.core.persistence.jpa.dao.AbstractAnyDAO<A>
-
- Direct Known Subclasses:
JPAAnyObjectDAO,JPAGroupDAO,JPAUserDAO
public abstract class AbstractAnyDAO<A extends Any<?>> extends AbstractDAO<A> implements AnyDAO<A>
-
-
Field Summary
Fields Modifier and Type Field Description protected AnyUtilsFactoryanyUtilsFactoryprotected DerSchemaDAOderSchemaDAOprotected DynRealmDAOdynRealmDAOprotected PlainSchemaDAOplainSchemaDAO-
Fields inherited from class org.apache.syncope.core.persistence.jpa.dao.AbstractDAO
LOG
-
Fields inherited from interface org.apache.syncope.core.persistence.api.dao.AnyDAO
DEFAULT_PAGE_SIZE
-
-
Constructor Summary
Constructors Constructor Description AbstractAnyDAO(AnyUtilsFactory anyUtilsFactory, PlainSchemaDAO plainSchemaDAO, DerSchemaDAO derSchemaDAO, DynRealmDAO dynRealmDAO)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected AnyUtilsanyUtils()AauthFind(String key)voiddelete(String key)Afind(String key)protected List<String>findAllKeys(String table, int page, int itemsPerPage)<S extends Schema>
AllowedSchemas<S>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 OffsetDateTimefindLastChange(String key, String table)SearchCondgetAllMatchingCond()protected abstract AnyUtilsinit()Asave(A any)protected abstract voidsecurityChecks(A any)-
Methods inherited from class org.apache.syncope.core.persistence.jpa.dao.AbstractDAO
detach, entityManager, entityManagerFactory, isOracle, refresh
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.syncope.core.persistence.api.dao.AnyDAO
count, delete, findAll, findAllKeys, findAllResourceKeys, findLastChange
-
-
-
-
Field Detail
-
anyUtilsFactory
protected final AnyUtilsFactory anyUtilsFactory
-
plainSchemaDAO
protected final PlainSchemaDAO plainSchemaDAO
-
derSchemaDAO
protected final DerSchemaDAO derSchemaDAO
-
dynRealmDAO
protected final DynRealmDAO dynRealmDAO
-
-
Constructor Detail
-
AbstractAnyDAO
public AbstractAnyDAO(AnyUtilsFactory anyUtilsFactory, PlainSchemaDAO plainSchemaDAO, DerSchemaDAO derSchemaDAO, DynRealmDAO dynRealmDAO)
-
-
Method Detail
-
init
protected abstract AnyUtils init()
-
anyUtils
protected AnyUtils anyUtils()
-
findLastChange
protected OffsetDateTime findLastChange(String key, String table)
-
securityChecks
protected abstract void securityChecks(A any)
-
findByKeys
@Transactional(readOnly=true) public List<A> findByKeys(List<String> keys)
- Specified by:
findByKeysin interfaceAnyDAO<A extends Any<?>>
-
authFind
@Transactional(readOnly=true) public A authFind(String key)
-
find
@Transactional(readOnly=true) public A find(String key)
-
findByPlainAttrValue
public List<A> findByPlainAttrValue(PlainSchema schema, PlainAttrValue attrValue, boolean ignoreCaseMatch)
- Specified by:
findByPlainAttrValuein interfaceAnyDAO<A extends Any<?>>
-
findByPlainAttrUniqueValue
public Optional<A> findByPlainAttrUniqueValue(PlainSchema schema, PlainAttrUniqueValue attrUniqueValue, boolean ignoreCaseMatch)
- Specified by:
findByPlainAttrUniqueValuein interfaceAnyDAO<A extends Any<?>>
-
findByDerAttrValue
public List<A> findByDerAttrValue(DerSchema schema, String value, boolean ignoreCaseMatch)
Description copied from interface:AnyDAOFind any objects by derived attribute value. This method could fail if one or more string literals contained into the derived attribute value provided derive from identifier (schema key) replacement. When you are going to specify a derived attribute expression you must be quite sure that string literals used to build the expression cannot be found into the attribute values used to replace attribute schema keys used as identifiers.- Specified by:
findByDerAttrValuein interfaceAnyDAO<A extends Any<?>>- Parameters:
schema- derived schemavalue- derived attribute valueignoreCaseMatch- whether comparison for string values should take case into account or not- Returns:
- list of any objects
-
findByResource
public List<A> findByResource(ExternalResource resource)
- Specified by:
findByResourcein interfaceAnyDAO<A extends Any<?>>
-
getAllMatchingCond
public SearchCond getAllMatchingCond()
- Specified by:
getAllMatchingCondin interfaceAnyDAO<A extends Any<?>>- Returns:
- the search condition to match all entities
-
findAllowedSchemas
@Transactional(propagation=REQUIRES_NEW, readOnly=true) public <S extends Schema> AllowedSchemas<S> findAllowedSchemas(A any, Class<S> reference)
- Specified by:
findAllowedSchemasin interfaceAnyDAO<A extends Any<?>>
-
findDynRealms
@Transactional(readOnly=true) public List<String> findDynRealms(String key)
- Specified by:
findDynRealmsin interfaceAnyDAO<A extends Any<?>>
-
-