/** * Constructs a DetailEntityItem using the fieldName and suffixId * * @param fieldName * the fieldName that represents the relationship * @param suffixId * used to generate field id */ public DetailEntityItem(JpaEntityMetadata childEntityMetadata, ControllerMetadata controllerMetadata, String controllerPath, String detailSuffix, EntityItem rootEntity) { super(childEntityMetadata.getDestination().getSimpleTypeName(), detailSuffix, childEntityMetadata.isReadOnly()); this.level = controllerMetadata.getDetailsFieldInfo().size(); this.rootEntity = rootEntity; this.fieldInfo = controllerMetadata.getLastDetailsInfo(); this.fieldName = fieldInfo.fieldName; this.fieldNameCapitalized = StringUtils.capitalize(fieldName); this.tabLinkCode = null; this.pathString = controllerMetadata.getDetailsPathAsString("-"); this.pathStringFieldNames = controllerMetadata.getDetailsPathAsString("."); this.controllerPath = controllerPath; this.templatePath = StringUtils.removeStart(controllerPath, "/"); this.z = calculateZ(); buildDetailItemId(detailSuffix); }
if (entityMetadata.isReadOnly() || entityMetadata.isCompositionChild()) { this.deleteMethod = null; this.saveBatchMethod = null; if (entityMetadata.isReadOnly()) { this.saveMethod = null; this.findOneForUpdateMethod = null; if (relationInfo.cardinality != Cardinality.ONE_TO_ONE && !entityMetadata.isReadOnly()) {
if (entityMetadata.isReadOnly()) {
protected EntityItem createEntityItem(JpaEntityMetadata entityMetadata, ViewContext<T> ctx, String suffix) { String versionFieldName = null; if (entityMetadata.getCurrentVersionField() != null) { versionFieldName = entityMetadata.getCurrentVersionField().getFieldName().getSymbolName(); } return new EntityItem(ctx.getEntityName(), ctx.getIdentifierField(), ctx.getControllerPath(), suffix, entityMetadata.isReadOnly(), versionFieldName); }
if (entityMetadata != null && entityMetadata.isReadOnly()) { isReadOnly = true;
boolean isReadOnly = jpaEntityMetadata.isReadOnly();
if (entityMetadata.isReadOnly()) {
this.readOnly = entityMetadata.isReadOnly(); this.controllerMetadata = controllerMetadata; this.type = this.controllerMetadata.getType(); if (!entityMetadata.isReadOnly()) { this.addToDetailsMethod = addAndGet(getAddToDetailsMethod(), allMethods); this.addToDetailsBatchMethod = addAndGet(getAddToDetailsBatchMethod(), allMethods);
if (!isReadOnly()) { ensureGovernorHasField(new FieldMetadataBuilder(getIterableToAddCantBeNullConstant())); ensureGovernorHasField(new FieldMetadataBuilder(getIterableToRemoveCantBeNullConstant())); if (!isReadOnly()) {
detailsControllersForListView, ctx); if (!entityMetadata.isReadOnly()) { if (!entityMetadata.isReadOnly() && viewMetadata.shouldGenerateView("edit")) {
if (this.entityMetadata.isReadOnly()) {
if (entityMetadata.isReadOnly()) {
if (entityMetadata.isReadOnly()) {
boolean isReadOnly = jpaEntityMetadata.isReadOnly();
if (entityMetadata.isReadOnly()) {
if (!isReadOnly()) { ensureGovernorHasField(new FieldMetadataBuilder(getIterableToAddCantBeNullConstant())); ensureGovernorHasField(new FieldMetadataBuilder(getIterableToRemoveCantBeNullConstant())); if (!isReadOnly()) {
if (this.entityMetadata.isReadOnly()) {