private ResultSet result;
- private Collection propertyIds;
+ private Collection<String> propertyIds;
- private final HashMap propertyTypes = new HashMap();
+ private final HashMap<String, Class<?>> propertyTypes = new HashMap<String, Class<?>>();
private int size = -1;
ResultSetMetaData metadata;
metadata = result.getMetaData();
final int count = metadata.getColumnCount();
- final ArrayList list = new ArrayList(count);
+ final ArrayList<String> list = new ArrayList<String>(count);
for (int i = 1; i <= count; i++) {
final String columnName = metadata.getColumnName(i);
list.add(columnName);
* @return Collection of Property ID.
*/
- public Collection getContainerPropertyIds() {
+ public Collection<String> getContainerPropertyIds() {
return propertyIds;
}
*
* @return collection of Item IDs
*/
- public Collection getItemIds() {
- final Collection c = new ArrayList(size);
+ public Collection<?> getItemIds() {
+ final Collection<Integer> c = new ArrayList<Integer>(size);
for (int i = 1; i <= size; i++) {
c.add(new Integer(i));
}
* @return data type of the Properties
*/
- public Class getType(Object id) {
- return (Class) propertyTypes.get(id);
+ public Class<?> getType(Object id) {
+ return propertyTypes.get(id);
}
/**
* @return unmodifiable collection containing IDs of the Properties
* stored the Item.
*/
- public Collection getItemPropertyIds() {
+ public Collection<String> getItemPropertyIds() {
return propertyIds;
}