- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 37 of file FieldItUtil.java.
◆ delete()
static void org.turro.fieldit.FieldItUtil.delete |
( |
FieldIt |
field | ) |
|
|
static |
Definition at line 122 of file FieldItUtil.java.
123 Dao dao =
new ContactsPU();
124 dao.executeUpdate(
"delete from ValueIt where fieldIt = ?",
new Object[] { field });
125 dao.deleteObject(field);
◆ fields() [1/2]
static FieldItSet org.turro.fieldit.FieldItUtil.fields |
( |
Object |
entity | ) |
|
|
static |
Definition at line 39 of file FieldItUtil.java.
40 String path = Entities.getController(entity).getPath();
44 return new FieldItSet();
static FieldItSet fields(Object entity)
◆ fields() [2/2]
static FieldItSet org.turro.fieldit.FieldItUtil.fields |
( |
String |
path | ) |
|
|
static |
Definition at line 47 of file FieldItUtil.java.
48 Dao dao =
new ContactsPU();
49 List l = dao.getResultList(
50 " select v from FieldIt v " +
54 FieldItSet fis =
new FieldItSet();
◆ getFieldValue()
static Object org.turro.fieldit.FieldItUtil.getFieldValue |
( |
String |
label, |
|
|
String |
entityPath |
|
) |
| |
|
static |
Definition at line 166 of file FieldItUtil.java.
167 ValueIt
value = FieldItUtil.value(label, entityPath);
170 return v ==
null ?
"" : v;
static ValueIt value(FieldIt field, String path)
◆ getLabel()
static String org.turro.fieldit.FieldItUtil.getLabel |
( |
Class |
javaClass | ) |
|
|
static |
Definition at line 103 of file FieldItUtil.java.
104 if(String.class.equals(javaClass)) {
105 return I_.get(
"String");
106 }
else if(Long.class.equals(javaClass)) {
107 return I_.get(
"Long integer");
108 }
else if(Double.class.equals(javaClass)) {
109 return I_.get(
"Double");
110 }
else if(Date.class.equals(javaClass)) {
111 return I_.get(
"Date");
112 }
else if(Boolean.class.equals(javaClass)) {
113 return I_.get(
"Boolean");
114 }
else if(StringList.class.equals(javaClass)) {
115 return I_.get(
"String list");
116 }
else if(AutoFillList.class.equals(javaClass)) {
117 return I_.get(
"Auto fill list");
◆ related()
static Collection<String> org.turro.fieldit.FieldItUtil.related |
( |
String |
path | ) |
|
|
static |
Definition at line 140 of file FieldItUtil.java.
141 Path p =
new Path(path);
142 Dao dao =
new ContactsPU();
143 return dao.getResultList(
144 " select v.path from ValueIt v " +
145 " where path <> ? " +
146 " and path like ? " +
150 new Object[] { path, p.getRoot() +
"/" }
◆ saveValues()
static void org.turro.fieldit.FieldItUtil.saveValues |
( |
Collection< ValueIt > |
values | ) |
|
|
static |
Definition at line 128 of file FieldItUtil.java.
129 Dao dao =
new ContactsPU();
133 }
else if(!Strings.isBlank(v.getId())) {
static ValueItSet values(Object entity)
◆ search()
static Collection<String> org.turro.fieldit.FieldItUtil.search |
( |
String |
path, |
|
|
String |
value |
|
) |
| |
|
static |
Definition at line 155 of file FieldItUtil.java.
156 Path p =
new Path(path);
157 Dao dao =
new ContactsPU();
158 return dao.getResultList(
159 " select v.path from ValueIt v " +
160 " where path like ? " +
161 " and v.value like ? ",
162 new Object[] { p.getRoot() +
"/",
value }
◆ value() [1/2]
static ValueIt org.turro.fieldit.FieldItUtil.value |
( |
FieldIt |
field, |
|
|
String |
path |
|
) |
| |
|
static |
Definition at line 79 of file FieldItUtil.java.
80 Dao dao =
new ContactsPU();
81 ValueIt vi = (ValueIt) dao.getSingleResultOrNull(
82 " select v from ValueIt v " +
83 " where path = ? and v.fieldIt = ? ",
84 new Object[] { path, field }
87 vi = field.createValue();
◆ value() [2/2]
static ValueIt org.turro.fieldit.FieldItUtil.value |
( |
String |
field, |
|
|
String |
path |
|
) |
| |
|
static |
Definition at line 93 of file FieldItUtil.java.
94 Dao dao =
new ContactsPU();
95 ValueIt vi = (ValueIt) dao.getSingleResultOrNull(
96 " select v from ValueIt v " +
97 " where path = ? and v.fieldIt.name = ? ",
98 new Object[] { path, field }
◆ values() [1/2]
static ValueItSet org.turro.fieldit.FieldItUtil.values |
( |
Object |
entity | ) |
|
|
static |
Definition at line 59 of file FieldItUtil.java.
60 String path = Entities.getController(entity).getPath();
64 return new ValueItSet();
◆ values() [2/2]
static ValueItSet org.turro.fieldit.FieldItUtil.values |
( |
String |
path | ) |
|
|
static |
Definition at line 67 of file FieldItUtil.java.
68 Dao dao =
new ContactsPU();
69 List l = dao.getResultList(
70 " select v from ValueIt v " +
74 ValueItSet vis =
new ValueItSet();
The documentation for this class was generated from the following file: