/** * Resolve attribute value's Java class */ public static Class getAttributeClass(CategoryAttribute attribute) { PropertyType propertyType = attribute.getDataType(); switch (propertyType) { case STRING: return String.class; case INTEGER: return Integer.class; case DOUBLE: return Double.class; case BOOLEAN: return Boolean.class; case DATE: return Date.class; case ENUMERATION: return String.class; case ENTITY: return attribute.getJavaClassForEntity(); } return String.class; }
Class javaClassForEntity = attribute.getJavaClassForEntity(); if (javaClassForEntity == null) { return new ArrayList<>();
public void openConstraintWizard() { Class entityClass = attribute.getJavaClassForEntity();
Class javaClass = categoryAttribute.getJavaClassForEntity(); if (javaClass == null) { throw new IllegalArgumentException("Entity type is not specified in category attribute");
MetaClass entityMetaClass = metadata.getClassNN(categoryAttribute.getJavaClassForEntity()); LoadContext<Entity> lc = new LoadContext<>(entityMetaClass).setView(View.MINIMAL); String pkName = referenceToEntitySupport.getPrimaryKeyForLoadingEntity(entityMetaClass);
case ENTITY: Object entityId = cav.getEntityValue().getObjectEntityId(); Class entityClass = cav.getCategoryAttribute().getJavaClassForEntity(); oldValue = entityId != null ? Id.of(entityId, entityClass) : null; break; case "entityValue": Object entityId = ((ReferenceToEntity) changeRecord.getOldValue()).getObjectEntityId(); Class entityClass = cav.getCategoryAttribute().getJavaClassForEntity(); oldValue = entityId != null ? Id.of(entityId, entityClass) : null; changed = true;
whereField.setEnabled(true); joinField.setEnabled(true); Class entityClass = attribute.getJavaClassForEntity(); MetaClass metaClass = metadata.getClass(entityClass); defaultEntityField.setMetaClass(metaClass);