i'm not sending the AbstractDataObject since it is only implementing a reflection toString()...
[code]
/**
* Represents a relations between a measure stat type to a measure attribute
*/
public class MeasureAttributeStatData extends AbstractDataObject {
int id;
int measureAttributeId;
int measureStatTypeId;
String description;
String columnName;
boolean isPercent;
boolean isForInAll;
String engineName;
public MeasureAttributeStatData(){
}
public MeasureAttributeStatData(int id, int measureAttributeId, int measureStatTypeId, String description, String columnName, boolean isPercent, boolean isForInAll, String engineName) {
this.id = id;
this.measureAttributeId = measureAttributeId;
this.measureStatTypeId = measureStatTypeId;
this.description = description;
this.columnName = columnName;
this.isPercent = isPercent;
this.isForInAll = isForInAll;
this.engineName = engineName;
}
public MeasureAttributeStatData(MeasureAttributeStatData data) {
this.id = data.id;
this.measureAttributeId = data.measureAttributeId;
this.measureStatTypeId = data.measureStatTypeId;
this.description = data.description;
this.columnName = data.columnName;
this.isPercent = data.isPercent;
this.isForInAll = data.isForInAll;
this.engineName = data.engineName;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getMeasureAttributeId() {
return measureAttributeId;
}
public void setMeasureAttributeId(int measureAttributeId) {
this.measureAttributeId = measureAttributeId;
}
public int getMeasureStatTypeId() {
return measureStatTypeId;
}
public void setMeasureStatTypeId(int measureStatTypeId) {
this.measureStatTypeId = measureStatTypeId;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getColumnName() {
return columnName;
}
public void setColumnName(String columnName) {
this.columnName = columnName;
}
public boolean getIsPercent() {
return isPercent;
}
public void setIsPercent(boolean percent) {
isPercent = percent;
}
public boolean getIsForInAll() {
return isForInAll;
}
public void setIsForInAll(boolean forInAll) {
isForInAll = forInAll;
}
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof MeasureAttributeStatData)) {
return false;
}
final MeasureAttributeStatData measureAttributeStatData = (MeasureAttributeStatData)o;
if (id != measureAttributeStatData.id) {
return false;
}
if (isPercent != measureAttributeStatData.isPercent) {
return false;
}
if (measureAttributeId != measureAttributeStatData.measureAttributeId) {
return false;
}
if (measureStatTypeId != measureAttributeStatData.measureStatTypeId) {
return false;
}
if (columnName != null ? !columnName.equals(measureAttributeStatData.columnName) : measureAttributeStatData.columnName != null) {
return false;
}
if (description != null ? !description.equals(measureAttributeStatData.description) : measureAttributeStatData.description != null) {
return false;
}
return true;
}
/**
* @return the engine name (as defined in builder.cfg) of this attribute stat
*/
public String getEngineName() {
return engineName;
}
/**
* @param engineName the engine name (as defined in builder.cfg) of this attribute stat
*/
public void setEngineName(String engineName) {
this.engineName = engineName;
}
}
[/code]
[code]/**
* measure statistic which are general for all measure attributes
*/
public class GeneralMeasureStatData extends MeasureAttributeStatData{
public GeneralMeasureStatData() {
}
public GeneralMeasureStatData(int id, int measureStatTypeId, String description, String columnName, boolean isPercent, String engineName) {
super(id, 0, measureStatTypeId, description, columnName, isPercent, false, engineName);
}
public int getMeasureAttributeId() {
return 0;
}
}
[/code]
|