Пример #1
0
 @Override
 public void createValueWithoutId(final String entityName, final Map<String, Object> fields)
     throws DataAccessException {
   try {
     final GenericValue v = delegatorInterface.makeValue(entityName, fields);
     v.create();
   } catch (final GenericEntityException ex) {
     throw new DataAccessException(ex);
   }
 }
Пример #2
0
  public GenericValue createValue(final String entityName, final Map<String, Object> fields) {
    try {
      final Map<String, Object> params =
          (fields == null) ? new HashMap<String, Object>(2) : new HashMap<String, Object>(fields);
      if (params.get("id") == null) {
        final Long id = delegatorInterface.getNextSeqId(entityName);
        params.put("id", id);
      }

      final GenericValue v = delegatorInterface.makeValue(entityName, params);
      v.create();
      return v;
    } catch (final GenericEntityException ex) {
      throw new DataAccessException(ex);
    }
  }
Пример #3
0
 @Override
 public GenericValue makeValue(String entityName, Map<String, Object> fields) {
   return delegatorInterface.makeValue(entityName, fields);
 }
Пример #4
0
 public GenericValue makeValue(final String entityName) {
   return delegatorInterface.makeValue(entityName, null);
 }