@Override
@TransactionAttribute(TransactionAttributeType.MANDATORY)
public void checkDistinguishedName(Organization organization)
throws DistinguishedNameException {
String dn = organization.getDistinguishedName();
if (dn != null && dn.length() > 0) {
Query query = dm
.createNamedQuery("Organization.countOrgsWithSameDN");
query.setParameter("distinguishedName", dn);
query.setParameter("organization", organization);
Long result = (Long) query.getSingleResult();
if (result.longValue() > 0) {
DistinguishedNameException e = new DistinguishedNameException();
logger.logWarn(Log4jLogger.SYSTEM_LOG, e,
LogMessageIdentifier.WARN_DUPLICATE_ORG_WITH_DISTINGUISHED_NAME,
dn);
throw e;
}
}
}
AccountServiceBean.java 文件源码
java
阅读 33
收藏 0
点赞 0
评论 0
项目:oscm
作者:
评论列表
文章目录