Package com.avoka.fc.core.dao
Class DatabaseIntegrityCheckerDao
java.lang.Object
com.avoka.core.dao.BaseDao
com.avoka.fc.core.dao.AbstractDao
com.avoka.fc.core.dao.DatabaseIntegrityCheckerDao
Provides a Database Integrity Checker DAO.
-
Field Summary
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionremoveRecordsWithInvalidRelations
(org.apache.cayenne.map.DbEntity dbe, int fetchLimit) Iterates through all the DBEntitiies and when an orphaned record is found then removes the database records where their foreign keys have no relationvalidateRecordsForRelation
(org.apache.cayenne.map.DbRelationship rel) Return the details of entity/field name if relationship validation fails for them otherwise return an empty string.Methods inherited from class com.avoka.fc.core.dao.AbstractDao
andFilterClientExcludeNull, andFilterClientIncludeNull, andFilterClientOnly, isClientAccessAllowed, performQueryConfigCached
Methods inherited from class com.avoka.core.dao.BaseDao
addOrdering, addOrderingCaseInsensitive, addOrderingCaseSensitive, andQueryBetween, andQueryInExp, andQueryInExp, andQueryInExp, andQueryLikeIgnoreCaseExp, andQueryLikeIgnoreCaseExp, andQueryMatchDbExp, andQueryMatchExp, andQueryMatchExp, andQueryMatchIsNotNull, andQueryMatchIsNotNull, andQueryMatchIsNull, andQueryMatchIsNull, andQueryNoMatchExp, andQueryNotTrue, deleteObject, deleteObjects, findObject, getDataContext, getFetchLimit, getLogger, getObjectForPK, newObject, orQueryLikeIgnoreCaseExp, orQueryMatchExp, performNamedQuery, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, performQuery, registerNewObject, setCacheStrategy, setFetchLimit, setLocalCacheStrategy, setLocalCacheStrategy, setSharedCacheStrategy, toMap, toMap
-
Constructor Details
-
DatabaseIntegrityCheckerDao
public DatabaseIntegrityCheckerDao()
-
-
Method Details
-
validateRecordsForRelation
Return the details of entity/field name if relationship validation fails for them otherwise return an empty string.- Parameters:
rel
- The foreign key relationship- Returns:
- The details of entity/field name if validation fails for them otherwise return an empty string
-
removeRecordsWithInvalidRelations
public Map<String,Integer> removeRecordsWithInvalidRelations(org.apache.cayenne.map.DbEntity dbe, int fetchLimit) Iterates through all the DBEntitiies and when an orphaned record is found then removes the database records where their foreign keys have no relation- Parameters:
dbe
- dbEntities to check and remove orpahned records if foundfetchLimit
- fetch limit- Returns:
- details of any removal if made
- Since:
- 24.10.0
-