本文整理汇总了Java中org.apache.directory.api.ldap.model.schema.AttributeType.isCollective方法的典型用法代码示例。如果您正苦于以下问题:Java AttributeType.isCollective方法的具体用法?Java AttributeType.isCollective怎么用?Java AttributeType.isCollective使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.directory.api.ldap.model.schema.AttributeType
的用法示例。
在下文中一共展示了AttributeType.isCollective方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: attributeTypesMatch
import org.apache.directory.api.ldap.model.schema.AttributeType; //导入方法依赖的package包/类
/**
* Checks two schema attributeTypes for an exact match.
*
* @param at0 the first attributeType to compare
* @param at1 the second attributeType to compare
* @return true if both attributeTypes match exactly, false otherwise
*/
public static boolean attributeTypesMatch( AttributeType at0, AttributeType at1 )
{
// compare all common description parameters
if ( !descriptionsMatch( at0, at1 ) )
{
return false;
}
// check that the same super type is being used for both attributes
if ( !at0.getSuperiorOid().equals( at1.getSuperiorOid() ) )
{
return false;
}
// check that the same matchingRule is used by both ATs for EQUALITY
if ( !at0.getEqualityOid().equals( at1.getEqualityOid() ) )
{
return false;
}
// check that the same matchingRule is used by both ATs for SUBSTRING
if ( !at0.getSubstringOid().equals( at1.getSubstringOid() ) )
{
return false;
}
// check that the same matchingRule is used by both ATs for ORDERING
if ( !at0.getOrderingOid().equals( at1.getOrderingOid() ) )
{
return false;
}
// check that the same syntax is used by both ATs
if ( !at0.getSyntaxOid().equals( at1.getSyntaxOid() ) )
{
return false;
}
// check that the syntax length constraint is the same for both
if ( at0.getSyntaxLength() != at1.getSyntaxLength() )
{
return false;
}
// check that the ATs have the same single valued flag value
if ( at0.isSingleValued() != at1.isSingleValued() )
{
return false;
}
// check that the ATs have the same collective flag value
if ( at0.isCollective() != at1.isCollective() )
{
return false;
}
// check that the ATs have the same user modifiable flag value
if ( at0.isUserModifiable() != at1.isUserModifiable() )
{
return false;
}
// check that the ATs have the same USAGE
if ( at0.getUsage() != at1.getUsage() )
{
return false;
}
return true;
}