@LoadValue(value=FindBy.class) @Retention(value=RUNTIME) @Target(value={PARAMETER,FIELD}) public @interface DbBind
The annotation specify a field or parameter should be retrieved from database through certain binding key with value get from the current ActContext
Modifier and Type | Optional Element and Description |
---|---|
boolean |
byId
Indicate if it shall use the resolved value to search for ID or normal field
|
java.lang.String |
field
Specify the mapping property name used to query database.
|
java.lang.Class |
fieldType
If
byId() is false then developer can use this field to specify the type of the search field |
java.lang.String |
value
Specifies the request parameter name.
|
public abstract java.lang.String value
Specifies the request parameter name. Default value is an empty string meaning the bind name coming from @Named annotation, or field name or param name) will be used as the request parameter name.
public abstract java.lang.String field
Specify the mapping property name used to query database. Default value is an empty string meaning use the binding name
as the property name.
public abstract boolean byId
Indicate if it shall use the resolved value to search for ID or normal field
Note this setting has no effect when any one of the following follow case is true
field()
setting is not blanktrue
if it shall bind by ID field, false
otherwisepublic abstract java.lang.Class fieldType
If byId()
is false
then developer can use this field to specify the type of the search field
Copyright © 2014–2017 ActFramework. All rights reserved.