001: // THIS SOFTWARE IS PROVIDED BY SOFTARIS PTY.LTD. AND OTHER METABOSS
002: // CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
003: // BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
004: // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTARIS PTY.LTD.
005: // OR OTHER METABOSS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
006: // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
007: // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
008: // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
009: // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
010: // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
011: // EVEN IF SOFTARIS PTY.LTD. OR OTHER METABOSS CONTRIBUTORS ARE ADVISED OF THE
012: // POSSIBILITY OF SUCH DAMAGE.
013: //
014: // Copyright 2000-2005 © Softaris Pty.Ltd. All Rights Reserved.
015: package com.metaboss.sdlctools.domains.enterprisemodel.storage;
016:
017: import com.metaboss.enterprise.ps.PSException;
018:
019: public interface PSEntity {
020: /** Naming URL of the component */
021: public static final String COMPONENT_URL = "component:/com.metaboss.sdlctools.domains.enterprisemodel.storage.PSEntity";
022:
023: /** Returns details entity corresponding to given reference or null struct if definition not found */
024: public STEntity getEntity(String pEntityRef) throws PSException;
025:
026: /** Inserts new entity record into the database */
027: public void insertEntity(STEntity pRecord) throws PSException;
028:
029: /** Updates entity details in the database */
030: public void updateEntity(STEntity pUpdatedRecord)
031: throws PSException;
032:
033: /** Deletes existing entity */
034: public void deleteEntity(String pEntityRef) throws PSException;
035:
036: /** Returns all attributes comprising this entity. The returned set includes
037: * only attributes defined in this entity and not in supertypes */
038: public STAttribute[] getAttributes(String pEntityRef)
039: throws PSException;
040:
041: /** Creates attribute in the specified entity. */
042: public void insertAttribute(String pEntityRef,
043: STAttribute pAttribute) throws PSException;
044:
045: /** Updates attribute in the specified entity. */
046: public void updateAttribute(String pEntityRef,
047: STAttribute pAttribute) throws PSException;
048:
049: /** Deletes attribute in the specified entity. */
050: public void deleteAttribute(String pEntityRef, String pAttributeName)
051: throws PSException;
052:
053: /** Returns single attribute with the specified name from specified entity */
054: public STAttribute getAttribute(String pEntityRef,
055: String pAttributeName) throws PSException;
056:
057: /** Returns all states defined in the state machine of this entity */
058: public STState[] getStates(String pEntityRef) throws PSException;
059:
060: /** Returns single state with the specified name from specified entity */
061: public STState getState(String pEntityRef, String pStateName)
062: throws PSException;
063:
064: /** Returns count of all states defined in the state machine of this entity */
065: public int getStatesCount(String pEntityRef) throws PSException;
066:
067: /** Returns all state transitions defined for the given state in the given entity */
068: public STStateTransition[] getStateTransitions(String pEntityRef,
069: String pStateName) throws PSException;
070:
071: /** Returns count of all state transitions defined for the given state in the given entity */
072: public int getStateTransitionsCount(String pEntityRef,
073: String pStateName) throws PSException;
074:
075: /** Returns all references to the association roles of this entity. The returned set includes
076: * only association roles defined in this entity and not in supertypes */
077: public String[] getAssociationRoleRefs(String pEntityRef)
078: throws PSException;
079:
080: /** Updates all references to the association roles of this entity. */
081: public void updateAssociationRoleRefs(String pEntityRef,
082: String[] pAssociationRoleRefs) throws PSException;
083:
084: /** Returns names of elements (atributes or relationships) comprising entity's primary key.
085: * The names are local and may refer to the attribute name or role name. */
086: public String[] getPrimaryKey(String pEntityRef) throws PSException;
087:
088: /** Returns all selectors defined for the specified entity */
089: public STSelector[] getSelectors(String pEntityRef)
090: throws PSException;
091:
092: /** Returns list of constraints for the specified entity */
093: public STConstraint[] getConstraints(String pEntityRef)
094: throws PSException;
095:
096: /** Returns selectors with given name from the given entity */
097: public STSelector getSelector(String pEntityRef,
098: String pSelectorName) throws PSException;
099:
100: /** Inserts selector with in the given entity */
101: public void insertSelector(String pEntityRef,
102: STSelector pSelectorDetails) throws PSException;
103:
104: /** Returns array of the inpput fields for the selector. May be zero length if there are no inputs */
105: public STField[] getSelectorInputFields(String pEntityRef,
106: String pSelectorName) throws PSException;
107:
108: /** Inserts input field in the selector */
109: public void insertSelectorInputField(String pEntityRef,
110: String pSelectorName, STField pFieldDetails)
111: throws PSException;
112: }
|