use of com.developmentontheedge.beans.DynamicPropertySet in project be5 by DevelopmentOnTheEdge.
the class EntityModelBase method add.
@Override
public String add(Map<String, ? super Object> values) {
Objects.requireNonNull(values);
DynamicPropertySet dps = new DynamicPropertySetSupport();
dpsHelper.addDpForColumnsWithoutTags(dps, entity, values.keySet(), values);
return add(dps);
}
use of com.developmentontheedge.beans.DynamicPropertySet in project be5 by DevelopmentOnTheEdge.
the class EntityModelBase method set.
@Override
public int set(String id, Map<String, ? super Object> values) {
Objects.requireNonNull(id);
Objects.requireNonNull(values);
DynamicPropertySet dps = new DynamicPropertySetSupport();
dpsHelper.addDpForColumnsWithoutTags(dps, entity, values.keySet(), values);
return this.set(id, dps);
}
use of com.developmentontheedge.beans.DynamicPropertySet in project be5 by DevelopmentOnTheEdge.
the class EntityModelBase method getColumns.
@Override
public RecordModel getColumns(List<String> columns, Map<String, ? super Object> conditions) {
Objects.requireNonNull(conditions);
AstSelect sql = Ast.select(addPrimaryKeyColumnIfNotEmpty(columns)).from(entity.getName()).where(conditions);
DynamicPropertySet dps = db.select(sql.format(), rs -> {
DynamicPropertySet newDps = new DynamicPropertySetSupport();
dpsHelper.addDpWithoutTags(newDps, entity, rs);
return newDps;
}, conditions.values().toArray());
return dps == null ? null : new RecordModelBase(this, dps);
}
use of com.developmentontheedge.beans.DynamicPropertySet in project be5 by DevelopmentOnTheEdge.
the class FilterByParamsInQueryOperation method getParameters.
@Override
public Object getParameters(Map<String, Object> presetValues) throws Exception {
DynamicPropertySet dps = new DynamicPropertySetSupport();
dpsHelper.addParamsFromQuery(dps, getInfo().getModel(), getQuery());
return filterHelper.processFilterParams(dps, presetValues, context.getOperationParams());
}
use of com.developmentontheedge.beans.DynamicPropertySet in project be5 by DevelopmentOnTheEdge.
the class SilentEditOperation method getParameters.
@Override
public Object getParameters(Map<String, Object> presetValues) throws Exception {
Entity entity = getInfo().getEntity();
DynamicPropertySet dps = dpsHelper.addDpExcludeAutoIncrement(new DynamicPropertySetSupport(), getInfo().getModel());
dpsHelper.setValues(dps, database.getEntity(entity.getName()).get(context.records[0]));
dpsHelper.setOperationParams(dps, context.getOperationParams());
return dpsHelper.setValues(dps, presetValues);
}
Aggregations