All Downloads are FREE. Search and download functionalities are using the official Maven repository.

me.prettyprint.hom.PropertyMappingDefinition Maven / Gradle / Ivy

There is a newer version: 3.0-04
Show newest version
package me.prettyprint.hom;

import java.beans.PropertyDescriptor;

import me.prettyprint.hom.converters.Converter;


public class PropertyMappingDefinition {
  private PropertyDescriptor propDesc;
  private String colName;
  @SuppressWarnings("rawtypes")
  private Converter converter;
  private Class collectionType;

  public Class getCollectionType() {
    return collectionType;
  }

  public void setCollectionType(Class collectionType) {
    this.collectionType = collectionType;
  }

  public PropertyMappingDefinition(PropertyDescriptor propDesc, String colName, @SuppressWarnings("rawtypes") Class converter)
  throws InstantiationException, IllegalAccessException {
    this.propDesc = propDesc;
    this.colName = colName;
    this.converter = converter.newInstance();
  }

  @Override
  public String toString() {
    return "PropertyMappingDefinition [colName=" + colName + ", converter=" + converter + ", propDesc=" + propDesc
    + "]";
  }

  public PropertyDescriptor getPropDesc() {
    return propDesc;
  }

  public String getColName() {
    return colName;
  }

  @SuppressWarnings("rawtypes")
  public Converter getConverter() {
    return converter;
  }

  public boolean isCollectionType() {
    return null != collectionType;
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy