⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lazybytescollection.java

📁 OPIAM stands for Open Identity and Access Management. This Suite will provide modules for user & rig
💻 JAVA
字号:
/*
 * OPIAM Suite
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */

package opiam.admin.faare.persistence;

import opiam.admin.faare.service.UserContext;

import org.apache.log4j.Logger;

import java.util.ArrayList;

/**
 * Lazy loading for binary attributes, such as photo or certificate.
 */
public class LazyBytesCollection extends LazyStringCollection
{
    /** Log4J. */
    private static Logger _logger = Logger.getLogger(LazyBytesCollection.class.getName());

   /**
     * Creates a new LazyBytesCollection object.
     *
     * @param enclosing Dname of entry containing attribute to load.
     * @param atts Attribute to load.
     * @param auserContext Connected user context.
     */
    public LazyBytesCollection(String enclosing, ArrayList atts,
        UserContext auserContext)
    {
        super(enclosing, atts, auserContext);
    }

    /**
     * Loads values.
     */
    protected void lazyLoad()
    {
        try
        {
            ArrayList bvalues = (ArrayList) PersistenceLDAP.loadBinaryAttribute(getDn(), getAtt(),
                    getUserContext());
            _logger.debug("lazyLoad temp.size() : " + bvalues.size());

            setLoaded(true);
            setValues(bvalues);
        }
        catch (Exception e)
        {
            if (_logger.isDebugEnabled())
            {
                _logger.debug("Trace", e);
            }

            throw new RuntimeException(
                "PersistenceException for lazy loaded object\n" + e);
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -