예제 #1
0
 public <T> void addValue(Attribute attribute, T value) {
   checkWritable();
   String attributeKey = attribute.getKey();
   String stringValue = toStringValue(attribute, value);
   if (stringValue == null) {
     return;
   }
   addValue(attributeKey, stringValue);
 }
예제 #2
0
 public void addRefValue(Attribute attribute, ReferenceInfo info) throws RaplaException {
   if (info == null) {
     return;
   }
   if (attribute.getRefType() != info.getType()) {
     throw new RaplaException(
         "Different reference type exepcted "
             + attribute.getRefType()
             + " but was "
             + info.getType());
   }
   String attributeKey = attribute.getKey();
   final String id = info.getId();
   addValue(attributeKey, id);
 }