public static AttributeParameter byName(String name) { return new AttributeParameter(name); } }
public static AttributeParameter byName(String name) { return new AttributeParameter(name); } }
@Override public <P extends Partition> P get(IdentityContext identityContext, Class<P> partitionClass, String name) { PartitionJdbcType pjt = new PartitionJdbcType(name); pjt.setDataSource(dataSource); Map<QueryParameter, Object[]> map = new HashMap<QueryParameter, Object[]>(); map.put(new AttributeParameter("name"), new Object[] { name }); return (P) pjt.load(map, Partition.class).get(0); }
@Override public <P extends Partition> P get(IdentityContext identityContext, Class<P> partitionClass, String name) { PartitionJdbcType pjt = new PartitionJdbcType(name); pjt.setDataSource(dataSource); Map<QueryParameter, Object[]> map = new HashMap<QueryParameter, Object[]>(); map.put(new AttributeParameter("name"), new Object[] { name }); return (P) pjt.load(map, Partition.class).get(0); }
@Override public List<? extends AttributedType> load(Map<QueryParameter, Object[]> params, Class<? extends AttributedType> attributedType) { List<AttributedType> result = new ArrayList<AttributedType>(); Object[] name = getValuesFromParamMap(params,new AttributeParameter("name")); PartitionStorageUtil partitionStorageUtil = new PartitionStorageUtil(); result.add(partitionStorageUtil.loadPartitionByName(dataSource, (String) name[0])); return result; }
@Override public List<? extends AttributedType> load(Map<QueryParameter, Object[]> params, Class<? extends AttributedType> attributedType) { List<AttributedType> result = new ArrayList<AttributedType>(); Object[] name = getValuesFromParamMap(params,new AttributeParameter("name")); PartitionStorageUtil partitionStorageUtil = new PartitionStorageUtil(); result.add(partitionStorageUtil.loadPartitionByName(dataSource, (String) name[0])); return result; }