Examples of FetchGroup


Examples of oracle.toplink.essentials.queryframework.FetchGroup

     * Return true if the cached object data should be written in clone.
     * It is used in Fetch Group case when filling in the clone from the cached object.
     */
    public boolean shouldWriteInto(Object cachedObject, Object clone) {
        if (isPartialObject(clone)) {
            FetchGroup fetchGroupInSrc = ((FetchGroupTracker)cachedObject).getFetchGroup();
            FetchGroup fetchGroupInTarg = ((FetchGroupTracker)clone).getFetchGroup();

            //if the target fetch group is not null (i.e. fully fetched object) or if partially fetched, it's not a superset of that of the source,
            //or if refresh is required, should always write (either refresh or revert) data from the cache to the clones.
            return (!((fetchGroupInTarg == null) || fetchGroupInTarg.isSupersetOf(fetchGroupInSrc)) || ((FetchGroupTracker)cachedObject).shouldRefreshFetchGroup());
        }
        return false;
    }

Examples of oracle.toplink.essentials.queryframework.FetchGroup

    /**
    * INTERNAL:
    * Write data of the partially fetched object into the working and backup clones
    */
    public void writePartialIntoClones(Object partialObject, Object workingClone, UnitOfWorkImpl uow) {
        FetchGroup fetchGroupInClone = ((FetchGroupTracker)workingClone).getFetchGroup();
        FetchGroup fetchGroupInObject = ((FetchGroupTracker)partialObject).getFetchGroup();
        Object backupClone = uow.getBackupClone(workingClone);

        //if refresh is set, force to fill in fecth group data
        if (((FetchGroupTracker)partialObject).shouldRefreshFetchGroup()) {
            //refresh and fill in the fecth group data

Examples of oracle.toplink.essentials.queryframework.FetchGroup

        //otherwise, union two fetch groups
        StringBuffer unionGroupName = new StringBuffer(first.getName());
        unionGroupName.append("_");
        unionGroupName.append(second.getName());
        FetchGroup unionFetchGroup = new FetchGroup(unionGroupName.toString());
        unionFetchGroup.addAttributes(first.getAttributes());
        unionFetchGroup.addAttributes(second.getAttributes());
        return unionFetchGroup;
    }

Examples of oracle.toplink.essentials.queryframework.FetchGroup

    /**
     * Return true if the attribute of the object has already been fetched
     */
    public boolean isAttributeFetched(Object object, String attributeName) {
        FetchGroup fetchgroup = ((FetchGroupTracker)object).getFetchGroup();
        return (fetchgroup == null) || (fetchgroup.getAttributes().contains(attributeName));
    }

Examples of org.apache.james.mailbox.MessageResult.FetchGroup

     * @param responder
     * @throws MailboxException
     */
    protected void processMessageRanges(final ImapSession session, final MessageManager mailbox, final List<MessageRange> ranges, final FetchData fetch, final boolean useUids, final MailboxSession mailboxSession, final Responder responder) throws MailboxException {
        final FetchResponseBuilder builder = new FetchResponseBuilder(new EnvelopeBuilder(session.getLog()));
        FetchGroup resultToFetch = getFetchGroup(fetch);

        for (int i = 0; i < ranges.size(); i++) {
            mailbox.getMessages(ranges.get(i), resultToFetch, mailboxSession, new MessageCallback() {

                public void onMessages(Iterator<MessageResult> it) throws MailboxException {

Examples of org.apache.james.mailbox.model.MessageResult.FetchGroup

     * @param responder
     * @throws MailboxException
     */
    protected void processMessageRanges(final ImapSession session, final MessageManager mailbox, final List<MessageRange> ranges, final FetchData fetch, final boolean useUids, final MailboxSession mailboxSession, final Responder responder) throws MailboxException {
        final FetchResponseBuilder builder = new FetchResponseBuilder(new EnvelopeBuilder(session.getLog()));
        FetchGroup resultToFetch = getFetchGroup(fetch);

        for (int i = 0; i < ranges.size(); i++) {
            MessageResultIterator messages = mailbox.getMessages(ranges.get(i), resultToFetch, mailboxSession);
            while (messages.hasNext()) {
                final MessageResult result = messages.next();

Examples of org.apache.openjpa.meta.FetchGroup

    /**
     * Perform post-load actions if the given fetch group is a post-load group
     * and is fully loaded.
     */
    private boolean postLoad(String fgName, FetchConfiguration fetch) {
        FetchGroup fg = _meta.getFetchGroup(fgName);
        if (fg == null || !fg.isPostLoad())
            return false;

        FieldMetaData[] fmds = _meta.getFields();
        for (int i = 0; i < fmds.length; i++)
            if (!_loaded.get(i) && fmds[i].isInFetchGroup(fgName))

Examples of org.apache.openjpa.meta.FetchGroup

    /**
     * Perform post-load actions if the given fetch group is a post-load group
     * and is fully loaded.
     */
    private boolean postLoad(String fgName, FetchConfiguration fetch) {
        FetchGroup fg = _meta.getFetchGroup(fgName);
        if (fg == null || !fg.isPostLoad())
            return false;

        FieldMetaData[] fmds = _meta.getFields();
        for (int i = 0; i < fmds.length; i++)
            if (!_loaded.get(i) && fmds[i].isInFetchGroup(fgName))

Examples of org.apache.openjpa.meta.FetchGroup

    /**
     * Perform post-load actions if the given fetch group is a post-load group
     * and is fully loaded.
     */
    private boolean postLoad(String fgName, FetchConfiguration fetch) {
        FetchGroup fg = _meta.getFetchGroup(fgName);
        if (fg == null || !fg.isPostLoad())
            return false;

        FieldMetaData[] fmds = _meta.getFields();
        for (int i = 0; i < fmds.length; i++)
            if (!_loaded.get(i) && fmds[i].isInFetchGroup(fgName))

Examples of org.apache.openjpa.meta.FetchGroup

    /**
     * Perform post-load actions if the given fetch group is a post-load group
     * and is fully loaded.
     */
    private boolean postLoad(String fgName, FetchConfiguration fetch) {
        FetchGroup fg = _meta.getFetchGroup(fgName);
        if (fg == null || !fg.isPostLoad())
            return false;

        FieldMetaData[] fmds = _meta.getFields();
        for (int i = 0; i < fmds.length; i++)
            if (!_loaded.get(i) && fmds[i].isInFetchGroup(fgName))
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.