Esempio n. 1
0
  // @ManyToOne(targetEntity = AValue.class, fetch = FetchType.LAZY, cascade = CascadeType.ALL)
  // @JoinColumn(name = "VALUE")
  @Embedded
  public AValue getValueItem() {
    // System.out.println("#---> getValueItem() reading " + value);

    if ((avalue == null) && (value != null)) {
      if (xsdType == null) {
        avalue =
            SQLValueConverter.convertToAValue(
                vc.getXsdType(value), value); // TODO, I am not using the one saved!
        // System.out.println("##---> getValueItem() reading found " + avalue);
      } else {
        avalue =
            SQLValueConverter.convertToAValue(xsdType, vc.convertToJava(xsdType, (String) value));
        // System.out.println("###--> getValueItem() reading found " + avalue);
        // System.out.println("###--> getValueItem() reading found - " +
        // SQLValueConverter.convertFromAValue(avalue));
      }
    }
    return avalue;
  }
Esempio n. 2
0
 /**
  * Gets the value of the value property.
  *
  * @return possible object is {@link Object }
  */
 public Object getValueAsJava(ValueConverter vconv) {
   if (valueAsJava == null) {
     valueAsJava = vconv.convertToJava(getType(), (String) value);
   }
   return valueAsJava;
 }