最近我正在阅读一篇关于hibernate的文章。我已经看到了这个请在这个上启发我
public Criteria createCriteria(String associationPath, String alias, int joinType) {
return new Subcriteria( this, associationPath, alias, joinType );//return new object
}
public Criteria createAlias(String associationPath, String alias, int joinType) {
new Subcriteria( this, associationPath, alias, joinType );
return this;//return this
}