【Java开源代码栏目提醒】:网学会员在Java开源代码频道为大家收集整理了ResponsibleEntityPersisterIF.java提供大家参考,希望对大家有所帮助!
/* -*- mode: Java; fill-column: 72 -*-
* The contents of this file are subject to the ClickBlocks Public
* License Version 1.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.clickblocks.org
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied, including, but not limited to, the implied warranties of
* merchantability, fitness for a particular purpose and
* non-infringement. See the License for the specific language
* governing rights and limitations under the License.
*
* ClickBlocks, the ClickBlocks logo and combinations thereof are
* trademarks of ClickBlocks, LLC in the United States and other
* countries.
*
* The Initial Developer of the Original Code is ClickBlocks, LLC.
* Portions created by ClickBlocks, LLC are Copyright (C) 2000.
* All Rights Reserved.
*/
/*
* $Log: ResponsibleEntityPersisterIF.java,v $
* Revision 1.1 2000/11/22 08:39:09 mgrand
* Changed OrganizationalEntityResponsibleForAccounts to
* ResponsibleEntity
*
* Revision 1.3 2000/11/14 12:25:29 mgrand
* Moved to clickblocks packages.
*
* Revision 1.2 2000/11/03 10:25:47 mgrand
* moved to clickblocks package structure.
*
* Revision 1.1.1.1 2000/10/30 01:37:39 mgrand
* reestablished local repository
*/
package org.clickblocks.entity;
import org.clickblocks.persistence.PersistenceIF;
import org.clickblocks.persistence.StaleObjectException;
import org.clickblocks.util.BusinessRuleException;
import org.clickblocks.util.DuplicateException;
import org.clickblocks.util.CBSystemException;
import org.clickblocks.util.NotFoundException;
import java.util.Iterator;
/**
* This interface is implemented by all classes that manage the
* persistence of <code>Organization</code> objects.
* @stereotype moment-interval
* @author Mark Grand
*/
public interface ResponsibleEntityPersisterIF
extends PersistenceIF {
/** @link dependency
* @label Persists*/
/*#ResponsibleEntity
lnkResponsibleEntity;*/
/**
* Persist the given
* <code>ResponsibleEntity</code>.
* @param org
* The <code>ResponsibleEntity</code>
* object to be persisted.
* @exception DuplicateException
* If a <code>Role</code> object with the same object ID as the
* given
* <code>ResponsibleEntity</code>
* has already been persisted.
* @exception CBSystemException
* If there is a problem this method cannot
* otherwise classify, it wraps the exception in an
* CBSystemException.
* @exception BusinessRuleException
* If the operation violates a constraint in the database
* that appears to reflect a business rule.
*/
public void create(ResponsibleEntity org)
throws DuplicateException, CBSystemException, BusinessRuleException ;
/**
* Return an <code>Iterator</code> over all the persisted
* <code>ResponsibleEntity</code> objects.
* @exception CBSystemException
* If there is an problem that this method cannot
* otherwise classify, it wraps the exception in an
* CBSystemException.
*/
public Iterator retrieve() throws CBSystemException;
/**
* Return the persisted version of the
* <code>ResponsibleEntity</code>
* object that has the given object id.
* @param id
* The id of the persisted <code>Organization</code> object to
* retrieve.
* @param forUpdate
* If this is true, then the persisted organization information is
* write locked in the expectation it will be updated by a
* future operation with the same transaction.
* @exception CBSystemException
* If there is an problem that this method cannot
* otherwise classify, it wraps the exception in an
* CBSystemException.
*/
public ResponsibleEntity
retrieve(long id, boolean forUpdate)
throws CBSystemException;
/**
* Update the persisted version of the given
* <code>ResponsibleEntity</code>.
* @param org
* The <code>ResponsibleEntity</code>
* object to be updated.
* @exception StaleObjectException
* If the <code>Organization</code> object is stale. For
* any given object id, the retrieve method or any
* iterators that it may create normally return the same
* object for any given object ID. However when an object
* is retrieved for update, the object returned may be a
* different object than returned previously. When that
* happens, objects previously returned with the same
* object id are considered stale.
* @exception NotFoundException
* If there is no persisted
* <code>ResponsibleEntity</code>
* object with the same object ID as