Search in sources :

Example 26 with DynamicProperty

use of com.developmentontheedge.beans.DynamicProperty in project be5 by DevelopmentOnTheEdge.

the class GDynamicPropertySetSupport method add.

public DynamicProperty add(String propertyName, @DelegatesTo(strategy = Closure.DELEGATE_FIRST, value = DPSAttributes.class) Closure cl) {
    DPSAttributes builder = getBuilder(cl);
    DynamicProperty property = new DynamicProperty(propertyName, builder.getTYPE());
    add(property);
    return DynamicPropertyMetaClass.leftShift(property, builder.getMap());
}
Also used : DynamicProperty(com.developmentontheedge.beans.DynamicProperty)

Example 27 with DynamicProperty

use of com.developmentontheedge.beans.DynamicProperty in project be5 by DevelopmentOnTheEdge.

the class TestOperation method getParameters.

@Override
public Object getParameters(Map<String, Object> presetValues) throws Exception {
    DynamicPropertySet dps = new DynamicPropertySetSupport();
    dps.add(new DynamicProperty("name", "Name", String.class, presetValues.getOrDefault("name", "")));
    dps.add(new DynamicProperty("number", "Number", Long.class, presetValues.getOrDefault("number", "0")));
    return dps;
}
Also used : DynamicPropertySet(com.developmentontheedge.beans.DynamicPropertySet) DynamicProperty(com.developmentontheedge.beans.DynamicProperty) DynamicPropertySetSupport(com.developmentontheedge.beans.DynamicPropertySetSupport)

Aggregations

DynamicProperty (com.developmentontheedge.beans.DynamicProperty)27 DynamicPropertySet (com.developmentontheedge.beans.DynamicPropertySet)7 ColumnDef (com.developmentontheedge.be5.metadata.model.ColumnDef)6 Map (java.util.Map)6 HashMap (java.util.HashMap)5 DynamicPropertySetSupport (com.developmentontheedge.beans.DynamicPropertySetSupport)4 SQLException (java.sql.SQLException)4 ArrayList (java.util.ArrayList)4 LinkedHashMap (java.util.LinkedHashMap)3 Be5Exception (com.developmentontheedge.be5.api.exceptions.Be5Exception)2 Formatter (com.developmentontheedge.sql.format.Formatter)2 List (java.util.List)2 TreeMap (java.util.TreeMap)2 SEARCH_PARAM (com.developmentontheedge.be5.api.FrontendConstants.SEARCH_PARAM)1 SEARCH_PRESETS_PARAM (com.developmentontheedge.be5.api.FrontendConstants.SEARCH_PRESETS_PARAM)1 Entity (com.developmentontheedge.be5.metadata.model.Entity)1 GroovyOperation (com.developmentontheedge.be5.metadata.model.GroovyOperation)1 JavaOperation (com.developmentontheedge.be5.metadata.model.JavaOperation)1 Query (com.developmentontheedge.be5.metadata.model.Query)1 JsonApiModel (com.developmentontheedge.be5.model.jsonapi.JsonApiModel)1