/** * Returns true if current ObjEntity is defined as abstract. */ public boolean isAbstract(ObjEntity anObjEntity) { return anObjEntity != null && anObjEntity.isAbstract(); }
/** * Returns true if current ObjEntity is defined as abstract. */ public boolean isAbstract(ObjEntity anObjEntity) { if (anObjEntity == null) return false; return objEntity.isAbstract(); }
private String getDBAttribute(ObjAttributeWrapper attribute, DbAttribute dbAttribute) { if (dbAttribute == null) { if (!attribute.isInherited() && attribute.getEntity().isAbstract()) { return attribute.getDbAttributePath(); } else { return null; } } else if (attribute.getDbAttributePath() != null && attribute.getDbAttributePath().contains(".")) { return attribute.getDbAttributePath(); } return dbAttribute.getName(); }
void validate(ObjEntity entity, ValidationResult validationResult) { validateName(entity, validationResult); validateClassName(entity, validationResult); validateSuperClassName(entity, validationResult); // validate DbEntity presence if (entity.getDbEntity() == null && !entity.isAbstract()) { addFailure( validationResult, entity, "ObjEntity '%s' has no DbEntity mapping", entity.getName()); } }
public void linkToParent(DataRow row, Persistent object) { Persistent parentObject = null; for (ObjEntity entity : sourceEntities) { if (entity.isAbstract()) { continue; } ObjectId id = node.getResolver().createObjectId(row, entity, relatedIdPrefix); if (id == null) { throw new CayenneRuntimeException("Can't build ObjectId from row: %s, entity: %s, prefix: %s" , row, entity.getName(), relatedIdPrefix); } parentObject = (Persistent) graphManager.getNode(id); if (parentObject != null) { break; } } node.linkToParent(object, parentObject); } }
readOnly.setSelected(entity.isReadOnly()); isAbstract.setSelected(entity.isAbstract()); serverOnly.setSelected(entity.isServerOnly()); clientClassName.setText(entity.getClientClassName());
private void validateDbAttribute(ObjAttribute attribute, ValidationResult validationResult) { if (attribute.getEntity().isAbstract()) {
if (isAbstract()) { encoder.print("\" abstract=\"true");