BaseEntity

import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

public abstract class BaseEntity
{
    public String toString()
    {
        return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
    }
    
    public String getTableName()
    {
        return this.getClass().getSimpleName().toUpperCase();
    }
    
    public abstract String getTablePrimaryKey();
}

 

你可能感兴趣的:(apache)