当前位置: 首页>>代码示例>>Java>>正文


Java AttributeType.isCollective方法代码示例

本文整理汇总了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;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:78,代码来源:ParserDescriptionUtils.java


注:本文中的org.apache.directory.api.ldap.model.schema.AttributeType.isCollective方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。