BrightSide Workbench Full Report + Source Code
org.turro.dossier.entity.FieldValue Class Reference
Inheritance diagram for org.turro.dossier.entity.FieldValue:
Collaboration diagram for org.turro.dossier.entity.FieldValue:

Public Member Functions

Dossier getDossier ()
 
void setDossier (Dossier dossier)
 
FieldDef getFieldDef ()
 
void setFieldDef (FieldDef fieldDef)
 
Long getId ()
 
void setId (Long id)
 
String getValue ()
 
void setValue (String value)
 
boolean isEmpty ()
 
void setObjectValue (Object obj)
 
Object getObjectValue ()
 
String getObjectString ()
 
String getObjectString (boolean label)
 
String getLabeledObjectString ()
 

Detailed Description

Member Function Documentation

◆ getDossier()

Dossier org.turro.dossier.entity.FieldValue.getDossier ( )

Definition at line 55 of file elephant-dossier/src/main/java/org/turro/dossier/entity/FieldValue.java.

55  {
56  return dossier;
57  }

◆ getFieldDef()

FieldDef org.turro.dossier.entity.FieldValue.getFieldDef ( )

Definition at line 63 of file elephant-dossier/src/main/java/org/turro/dossier/entity/FieldValue.java.

63  {
64  return fieldDef;
65  }
Here is the caller graph for this function:

◆ getId()

Long org.turro.dossier.entity.FieldValue.getId ( )

Definition at line 71 of file elephant-dossier/src/main/java/org/turro/dossier/entity/FieldValue.java.

71  {
72  return id;
73  }
Here is the caller graph for this function:

◆ getLabeledObjectString()

String org.turro.dossier.entity.FieldValue.getLabeledObjectString ( )

Definition at line 123 of file elephant-dossier/src/main/java/org/turro/dossier/entity/FieldValue.java.

123  {
124  Object obj = getObjectValue();
125  if(obj instanceof Boolean) {
126  return ((Boolean) obj) ? I_.get(fieldDef.getLabelKey()) : "";
127  } else if(obj instanceof Number) {
128  return I_.get(fieldDef.getLabelKey()) + ": " + DecimalFormats.format((Number) obj);
129  } else if(obj instanceof Date) {
130  return I_.get(fieldDef.getLabelKey()) + ": " + DateFormats.format((Date) obj, true);
131  } else if(obj instanceof String) {
132  return I_.get(fieldDef.getLabelKey()) + ": " + (String) obj;
133  }
134  return obj == null ? "" : I_.get(fieldDef.getLabelKey()) + ": " + obj.toString();
135  }
Here is the call graph for this function:

◆ getObjectString() [1/2]

String org.turro.dossier.entity.FieldValue.getObjectString ( )

◆ getObjectString() [2/2]

String org.turro.dossier.entity.FieldValue.getObjectString ( boolean  label)

Definition at line 105 of file elephant-dossier/src/main/java/org/turro/dossier/entity/FieldValue.java.

105  {
106  Object obj = getObjectValue();
107  if(obj instanceof Boolean) {
108  if(label) {
109  return BooleanFormats.format((Boolean) obj);
110  } else {
111  return ((Boolean) obj) ? I_.get(fieldDef.getLabelKey()) : "";
112  }
113  } else if(obj instanceof Number) {
114  return DecimalFormats.format((Number) obj);
115  } else if(obj instanceof Date) {
116  return DateFormats.format((Date) obj, true);
117  } else if(obj instanceof String) {
118  return (String) obj;
119  }
120  return obj == null ? "" : obj.toString();
121  }
Here is the call graph for this function:

◆ getObjectValue()

Object org.turro.dossier.entity.FieldValue.getObjectValue ( )

Definition at line 97 of file elephant-dossier/src/main/java/org/turro/dossier/entity/FieldValue.java.

97  {
98  return ObjectString.parseNativeString(value, fieldDef.getJavaClass(), false);
99  }
Here is the caller graph for this function:

◆ getValue()

String org.turro.dossier.entity.FieldValue.getValue ( )

Definition at line 79 of file elephant-dossier/src/main/java/org/turro/dossier/entity/FieldValue.java.

79  {
80  return value;
81  }

◆ isEmpty()

boolean org.turro.dossier.entity.FieldValue.isEmpty ( )

Definition at line 89 of file elephant-dossier/src/main/java/org/turro/dossier/entity/FieldValue.java.

89  {
90  return Strings.isBlank(value);
91  }

◆ setDossier()

void org.turro.dossier.entity.FieldValue.setDossier ( Dossier  dossier)

Definition at line 59 of file elephant-dossier/src/main/java/org/turro/dossier/entity/FieldValue.java.

59  {
60  this.dossier = dossier;
61  }

◆ setFieldDef()

void org.turro.dossier.entity.FieldValue.setFieldDef ( FieldDef  fieldDef)

Definition at line 67 of file elephant-dossier/src/main/java/org/turro/dossier/entity/FieldValue.java.

67  {
68  this.fieldDef = fieldDef;
69  }

◆ setId()

void org.turro.dossier.entity.FieldValue.setId ( Long  id)

Definition at line 75 of file elephant-dossier/src/main/java/org/turro/dossier/entity/FieldValue.java.

75  {
76  this.id = id;
77  }

◆ setObjectValue()

void org.turro.dossier.entity.FieldValue.setObjectValue ( Object  obj)

Definition at line 93 of file elephant-dossier/src/main/java/org/turro/dossier/entity/FieldValue.java.

93  {
94  value = ObjectString.formatNativeObject(obj, false);
95  }

◆ setValue()

void org.turro.dossier.entity.FieldValue.setValue ( String  value)

Definition at line 83 of file elephant-dossier/src/main/java/org/turro/dossier/entity/FieldValue.java.

83  {
84  this.value = value;
85  }

The documentation for this class was generated from the following file: