本文整理汇总了Java中org.opengts.db.tables.Role类的典型用法代码示例。如果您正苦于以下问题:Java Role类的具体用法?Java Role怎么用?Java Role使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Role类属于org.opengts.db.tables包,在下文中一共展示了Role类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRole
import org.opengts.db.tables.Role; //导入依赖的package包/类
public final Role getRole()
{
if (this.role == null) {
String roleID = this.getRoleID();
Print.logDebug("[Optimize] Retrieving Role record: " + roleID);
try {
this.role = Role.getRole(this.getAccount(), roleID);
// may still be null if the role was not found
} catch (DBException dbe) {
// may be caused by "java.net.ConnectException: Connection refused: connect"
Print.logError("Role not found: " + this.getAccountID() + "/" + roleID);
this.role = null;
}
}
return this.role;
}
示例2: setRole
import org.opengts.db.tables.Role; //导入依赖的package包/类
public final void setRole(Role role)
{
if ((role != null) &&
role.getAccountID().equals(this.getAccountID()) &&
role.getRoleID().equals(this.getRoleID() ) ) {
this.setAccount(role.getAccount());
this.role = role;
} else {
this.role = null;
}
}
示例3: getRoleDescription
import org.opengts.db.tables.Role; //导入依赖的package包/类
public final String getRoleDescription()
{
if (this.roleDesc == null) {
Role role = this.getRole();
this.roleDesc = (role != null)? role.getDescription() : this.getRoleID();
}
return this.roleDesc;
}