Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 918 → Rev 919

/sun/hostcaptain/trunk/src/ak/hostcaptain/core/model/GeneralModelObject.java
1,59 → 1,79
package ak.hostcaptain.core.model;
 
import java.util.Date;
 
public abstract class GeneralModelObject
implements ModelObject
{
private Boolean enabled;
private String comment;
private Date modStamp;
package ak.hostcaptain.core.model;
 
import java.util.Date;
import ak.hostcaptain.util.ModelException;
import ak.hostcaptain.util.ModelSecurityException;
 
public abstract class GeneralModelObject
implements ModelObject
{
private Boolean enabled;
private String comment;
private Date modStamp;
private User modUser;
 
/**
*
* @hibernate.property
*/
public Boolean getEnabled()
{
return enabled;
}
 
public void setEnabled(Boolean enabled)
{
this.enabled = enabled;
}
 
/**
*
* @hibernate.property
*/
public String getComment()
{
return comment;
}
 
public void setComment(String comment)
{
this.comment = comment;
}
 
/**
*
* @hibernate.timestamp column="mod_stamp"
*/
public Date getModStamp()
{
return modStamp;
}
 
protected void setModStamp(Date modStamp)
{
this.modStamp = modStamp;
}
 
 
/**
*
* @hibernate.property
*/
public Boolean getEnabled()
{
return enabled;
}
 
public void setEnabled(Boolean enabled)
{
this.enabled = enabled;
}
 
public void setEnabled(User editor, Boolean enabled)
throws ModelException
{
if(!editableBy(editor))
throw new ModelSecurityException();
 
this.enabled = enabled;
}
 
/**
*
* @hibernate.property
*/
public String getComment()
{
return comment;
}
 
public void setComment(String comment)
{
this.comment = comment;
}
 
public void setComment(User editor, String comment)
throws ModelException
{
if(!editableBy(editor))
throw new ModelSecurityException();
 
this.comment = comment;
}
 
/**
*
* @hibernate.timestamp column="mod_stamp"
*/
public Date getModStamp()
{
return modStamp;
}
 
protected void setModStamp(Date modStamp)
{
this.modStamp = modStamp;
}
 
/**
*
* @hibernate.many-to-one column="mod_user"
*/
public User getModUser()
65,4 → 85,4
{
this.modUser = modUser;
}
}
}