Search in sources :

Example 1 with CommitLog

use of org.apache.cayenne.commitlog.CommitLog in project cayenne by apache.

the class AnnotationCommitLogEntityFactory method createDescriptor.

private CommitLogEntity createDescriptor(String entityName) {
    EntityResolver entityResolver = getEntityResolver();
    ClassDescriptor classDescriptor = entityResolver.getClassDescriptor(entityName);
    CommitLog a = classDescriptor.getObjectClass().getAnnotation(CommitLog.class);
    if (a == null) {
        return BLOCKED_ENTITY;
    }
    ObjEntity entity = entityResolver.getObjEntity(entityName);
    return new MutableCommitLogLogEntity(entity).setConfidential(a.confidential()).setIgnoreProperties(a.ignoredProperties()).setIgnoreAttributes(a.ignoreAttributes()).setIgnoreToOneRelationships(a.ignoreToOneRelationships()).setIgnoreToManyRelationships(a.ignoreToManyRelationships());
}
Also used : ObjEntity(org.apache.cayenne.map.ObjEntity) ClassDescriptor(org.apache.cayenne.reflect.ClassDescriptor) EntityResolver(org.apache.cayenne.map.EntityResolver) CommitLog(org.apache.cayenne.commitlog.CommitLog)

Aggregations

CommitLog (org.apache.cayenne.commitlog.CommitLog)1 EntityResolver (org.apache.cayenne.map.EntityResolver)1 ObjEntity (org.apache.cayenne.map.ObjEntity)1 ClassDescriptor (org.apache.cayenne.reflect.ClassDescriptor)1