@Updatable(false) @Insertable(false) @Label("Length") public String getShortLength() { if(getLength() == null) { return null; } String[] suffix = new String[] { "", "K", "M", "G", "T" }; java.text.DecimalFormat decimalFormat = new java.text.DecimalFormat("##0E0"); String result = decimalFormat.format(getLength()); int suffixIndex = Character.getNumericValue(result.charAt(result.length() - 1)) / 3; return result.replaceAll("E[0-9]", suffix[suffixIndex]); }
boolean accessorInsertable = (insertableAnn == null || insertableAnn.value());
accessor.getAnnotation(Insertable.class); if (insertableAnnotation != null) { insertable = insertableAnnotation.value(); logger.debug("Insertable annotation present with value: {}", insertable);
accessor.getAnnotation(Insertable.class); if (insertableAnnotation != null) { insertable = insertableAnnotation.value(); logger.debug("Insertable annotation present with value: {}", insertable);
@Insertable(false) @Updatable(false) public String getHqlQuery() { return "from " + StringUtils.defaultIfEmpty(entityName, actualEntityName); }
boolean accessorInsertable = (insertableAnn == null || insertableAnn.value());
@Label("In primary key") @Updatable(false) @Insertable(false) public boolean isInPk() { return inPk; }
protected void setupPropertyEdits() { if(classAccessor == null) { return; } PropertyAccessor[] propertyAccessors = classAccessor.getProperties(); propertyEdits = new CrudPropertyEdit[propertyAccessors.length]; for (int i = 0; i < propertyAccessors.length; i++) { CrudPropertyEdit edit = new CrudPropertyEdit(); PropertyAccessor propertyAccessor = propertyAccessors[i]; edit.name = propertyAccessor.getName(); com.manydesigns.elements.annotations.Label labelAnn = propertyAccessor.getAnnotation(com.manydesigns.elements.annotations.Label.class); edit.label = labelAnn != null ? labelAnn.value() : null; Enabled enabledAnn = propertyAccessor.getAnnotation(Enabled.class); edit.enabled = enabledAnn != null && enabledAnn.value(); InSummary inSummaryAnn = propertyAccessor.getAnnotation(InSummary.class); edit.inSummary = inSummaryAnn != null && inSummaryAnn.value(); Insertable insertableAnn = propertyAccessor.getAnnotation(Insertable.class); edit.insertable = insertableAnn != null && insertableAnn.value(); Updatable updatableAnn = propertyAccessor.getAnnotation(Updatable.class); edit.updatable = updatableAnn != null && updatableAnn.value(); Searchable searchableAnn = propertyAccessor.getAnnotation(Searchable.class); edit.searchable = searchableAnn != null && searchableAnn.value(); propertyEdits[i] = edit; } }
@Label("Type") @Updatable(false) @Insertable(false) public Type getType() { return type; }
/** * @author Paolo Predonzani - paolo.predonzani@manydesigns.com * @author Angelo Lupo - angelo.lupo@manydesigns.com * @author Giampiero Granatella - giampiero.granatella@manydesigns.com * @author Alessio Stalla - alessio.stalla@manydesigns.com */ public class EditChildPage { public static final String copyright = "Copyright (C) 2005-2017 ManyDesigns srl"; @Updatable(false) @Insertable(false) public String name; public boolean active; @Label("embed.in.parent") public boolean embedded; @Label("show.in.navigation") public boolean showInNavigation; @Updatable(false) @Insertable(false) public String title; }
@Label("Null") @Insertable(false) @Updatable(false) public boolean isReallyNullable() { return isNullable(); }
@Override @FieldSize(4) @Updatable(false) @Insertable(false) public Integer getLength() { return super.getLength(); }
@Override @Updatable(false) @Insertable(false) @Label("Name") public String getColumnName() { return super.getColumnName(); }
@Override @FieldSize(4) @Updatable(false) @Insertable(false) public Integer getScale() { return super.getScale(); }
@Label("Autoincrement") @Insertable(false) @Updatable(false) public boolean isReallyAutoincrement() { return isAutoincrement(); }