@Updatable(false) public String getStatus() { return status; }
boolean accessorUpdatable = (updatableAnn == null || updatableAnn.value());
accessor.getAnnotation(Updatable.class); if (updatableAnnotation != null) { updatable = updatableAnnotation.value(); logger.debug("Updatable annotation present with value: {}", updatable);
@Updatable(false) public String getErrorMessage() { return errorMessage; }
accessor.getAnnotation(Updatable.class); if (updatableAnnotation != null) { updatable = updatableAnnotation.value(); logger.debug("Updatable annotation present with value: {}", updatable);
@Updatable(false) public String getErrorMessage() { return errorMessage; }
boolean accessorUpdatable = (updatableAnn == null || updatableAnn.value());
@Updatable(false) public String getStatus() { return status; }
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; } }
/** * @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 SelectableSchema { public static final String copyright = "Copyright (C) 2005-2017 ManyDesigns srl"; @Updatable(false) public final String catalogName; @Updatable(false) public final String schema; @Updatable(true) public String schemaName; @Label("") public boolean selected; public SelectableSchema(String catalogName, String schemaName, String schema,boolean selected) { this.catalogName = catalogName; this.schemaName = schemaName; this.schema = schema; this.selected = selected; } }
@DateFormat("yyyy-MM-dd HH:mm:ss") @Updatable(false) public Date getLastTested() { return lastTested; }
@DateFormat("yyyy-MM-dd HH:mm:ss") @Updatable(false) public Date getLastTested() { return lastTested; }
/** * @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 CrudPropertyEdit { public static final String copyright = "Copyright (C) 2005-2017 ManyDesigns srl"; @Label("") public boolean enabled; @Updatable(false) public String name; public String label; public boolean insertable; public boolean updatable; public boolean inSummary; public boolean searchable; }
/** * @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 SelectableRoot { public static final String copyright = "Copyright (C) 2005-2017 ManyDesigns srl"; @Updatable(false) public String tableName; @Label("") public boolean selected; public SelectableRoot(String tableName, boolean selected) { this.tableName = tableName; this.selected = selected; } public SelectableRoot() {} }
@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]); }
@Insertable(false) @Updatable(false) public String getHqlQuery() { return "from " + StringUtils.defaultIfEmpty(entityName, actualEntityName); }
@Updatable(false) @Required(true) public String getDatabaseName() { return database.getDatabaseName(); }
@Label("In primary key") @Updatable(false) @Insertable(false) public boolean isInPk() { return inPk; }
@Label("Type") @Updatable(false) @Insertable(false) public Type getType() { return type; }
@Updatable(false) @Required(true) public String getDatabaseName() { return database.getDatabaseName(); }