public boolean isPkNotNull() { TableLayout layout = TableLayoutRepository.getLayout(environmentId, tableName); for (Column column : layout.getPkColumns()) { Object val = entityParameter.get(Const.db.ORM_PARAMETER_ENTITY + column.getKey()); if (val == null) return false; } return true; }
public String getPkValues() { TableLayout layout = TableLayoutRepository.getLayout(environmentId, tableName); NMap params = new NMap(); for (Column column : layout.getPkColumns()) { params.put( column.getKey(), entityParameter.get(Const.db.ORM_PARAMETER_ENTITY + column.getKey())); } return params.toJson(); }