All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gs.fw.common.mithra.list.MithraDelegatedTransactionalList Maven / Gradle / Ivy

There is a newer version: 18.1.0
Show newest version

/*
 Copyright 2016 Goldman Sachs.
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 */

package com.gs.fw.common.mithra.list;

import com.gs.fw.common.mithra.attribute.*;
import com.gs.fw.common.mithra.extractor.EmbeddedValueExtractor;
import com.gs.fw.common.mithra.util.Time;

import java.sql.Timestamp;
import java.util.Date;
import java.math.BigDecimal;


public interface MithraDelegatedTransactionalList extends MithraDelegatedList
{

    void insertAll(DelegatingList delegatingList);
    void bulkInsertAll(DelegatingList delegatingList);
    void deleteAll(DelegatingList delegatingList);
    void deleteAllInBatches(DelegatingList delegatingList, int batchSize);
    void terminateAll(DelegatingList delegatingList);
    void purgeAll(DelegatingList delegatingList);
    void purgeAllInBatches(DelegatingList delegatingList, int batchSize);

    /**
     * This method must only be used with a detached list. A detached list keeps track of which objects have been
     * added and removed and can insert added objects and delete removed ones.
     *
     * This method is not appropriate for dated objects. use copyDetachedValuesToOriginalOrInsertIfNewOrTerminateIfRemoved
     * instead.
     * @param delegatingList
     */
    void copyDetachedValuesToOriginalOrInsertIfNewOrDeleteIfRemoved(DelegatingList delegatingList);

    /**
     * This method must only be used with a detached list. A detached list keeps track of which objects have been
     * added and removed and can insert added objects and terminate removed ones.
     *
     * This method is for dated objects only.
     * @param delegatingList
     */
    void copyDetachedValuesToOriginalOrInsertIfNewOrTerminateIfRemoved(DelegatingList delegatingList);

    void copyDetachedValuesToOriginalUntilOrInsertIfNewUntilOrTerminateIfRemoved(DelegatingList delegatingList, Timestamp exclusiveUntil);

    MithraDelegatedTransactionalList zSetRemoveHandler(DelegatingList delegatingList, DependentRelationshipRemoveHandler removeHandler);

    void cascadeInsertAll(DelegatingList delegatingList);

    void cascadeInsertAllUntil(DelegatingList delegatingList, Timestamp exclusiveUntil);

    void cascadeDeleteAll(DelegatingList delegatingList);

    void cascadeTerminateAll(DelegatingList delegatingList);

    void cascadeTerminateAllUntil(DelegatingList delegatingList, Timestamp exclusiveUntil);

    MithraDelegatedTransactionalList zSetAddHandler(DelegatingList delegatingList, DependentRelationshipAddHandler addHandler);

    public void zCopyDetachedValuesDeleteIfRemovedOnly(DelegatingList delegatingList);

    public void cascadeUpdateInPlaceBeforeTerminate(DelegatingList delegatingList);

    public void setBoolean(DelegatingList delegatingList, BooleanAttribute attr, boolean newValue);

    public void setByte(DelegatingList delegatingList, ByteAttribute attr, byte newValue);

    public void setShort(DelegatingList delegatingList, ShortAttribute attr, short newValue);

    public void setChar(DelegatingList delegatingList, CharAttribute attr, char newValue);

    public void setInteger(DelegatingList delegatingList, IntegerAttribute attr, int newValue);

    public void setLong(DelegatingList delegatingList, LongAttribute attr, long newValue);

    public void setFloat(DelegatingList delegatingList, FloatAttribute attr, float newValue);

    public void setDouble(DelegatingList delegatingList, DoubleAttribute attr, double newValue);

    public void setString(DelegatingList delegatingList, StringAttribute attr, String newValue);

    public void setTimestamp(DelegatingList delegatingList, TimestampAttribute attr, Timestamp newValue);

    public void setDate(DelegatingList delegatingList, DateAttribute attr, Date newValue);

    public void setTime(DelegatingList delegatingList, TimeAttribute attr, Time newValue);

    public void setByteArray(DelegatingList delegatingList, ByteArrayAttribute attr, byte[] newValue);

    public void setBigDecimal(DelegatingList delegatingList, BigDecimalAttribute attr, BigDecimal newValue);

    public void setAttributeNull(DelegatingList delegatingList, Attribute attr);

    public void setEvoValue(DelegatingList delegatingList, EmbeddedValueExtractor attribute, Object evo);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy