Package org.lightadmin.core.config.domain.field

Examples of org.lightadmin.core.config.domain.field.PersistentFieldMetadata


    }

    @Override
    protected void visitInternal(DefaultFieldSetConfigurationUnit configurationUnit) {
        PersistentProperty idProperty = persistentEntity.getIdProperty();
        PersistentFieldMetadata primaryKeyField = getPersistentField(configurationUnit.getFields(), idProperty.getName());

        if (primaryKeyField != null) {
            primaryKeyField.setPrimaryKey(true);
        } else {
            configurationUnit.addField(keyField(capitalize(idProperty.getName()), idProperty.getName()));
        }

        configurationUnit.doWithPersistentFields(new FieldHandler<PersistentFieldMetadata>() {
View Full Code Here


        if (parentUnit instanceof FieldSetConfigurationUnit && configurationUnit instanceof FieldSetConfigurationUnit) {
            Set<FieldMetadata> parentDecls = ((FieldSetConfigurationUnit) parentUnit).getFields();

            FluentIterable<PersistentFieldMetadata> localDecls = FluentIterable.from(((FieldSetConfigurationUnit) configurationUnit).getFields()).filter(PersistentFieldMetadata.class);
            for (PersistentFieldMetadata localDecl : localDecls) {
                PersistentFieldMetadata parentDecl = FieldMetadataUtils.getPersistentField(parentDecls, localDecl.getField());
                if (parentDecl != null) {
                    localDecl.inheritFrom(parentDecl);
                }
            }
        }
View Full Code Here

            }
        });
    }

    private boolean propertyIsHiddenInFormView(PersistentProperty persistentProperty, DomainTypeAdministrationConfiguration configuration) {
        PersistentFieldMetadata persistentField = getPersistentField(configuration.getFormViewFragment().getFields(), persistentProperty.getName());

        return persistentField == null;
    }
View Full Code Here

        assertFieldMetadataIsNotNull();
        assertFieldMetadataType(currentFieldMetadata, PersistentFieldMetadata.class);

        assertValidEnumElements(elements);

        PersistentFieldMetadata fieldMetadata = (PersistentFieldMetadata) currentFieldMetadata;
        fieldMetadata.setRenderer(new EnumRenderer(elements));

        withCustomControl(Editors.enumeration(elements));

        return (B) this;
    }
View Full Code Here

TOP

Related Classes of org.lightadmin.core.config.domain.field.PersistentFieldMetadata

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.