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.models.modelassistant.metabossmodel.implicittypes;
016:
017: /** Implementation of the simple stylesheet class, which is
018: * responsible for creation of derived names */
019: public class StylesheetImpl {
020: // Helper. Returns the name of the instance identifier data type for the entity
021: static String getEntityInstanceIdDataTypeName(String pEntityName) {
022: return pEntityName + "InstanceId";
023: }
024:
025: // Helper. Returns the description of the instance identifier data type for the entity
026: static String getEntityInstanceIdDataTypeDescription(
027: String pEntityName) {
028: return "Represents unique identifier for the " + pEntityName
029: + " entity instances.";
030: }
031:
032: // Helper. Returns the name of the ordering instruction data type for the entity
033: static String getEntityVersionIdDataTypeName(String pEntityName) {
034: return pEntityName + "VersionId";
035: }
036:
037: // Helper. Returns the description of the ordering instruction data type for the entity
038: static String getEntityVersionIdDataTypeDescription(
039: String pEntityName) {
040: return "Represents version identifier for the " + pEntityName
041: + " entity instances.";
042: }
043:
044: // Helper. Returns the name of the state data type for the entity
045: static String getEntityStateDataTypeName(String pEntityName) {
046: return pEntityName + "State";
047: }
048:
049: // Helper. Returns the description of the state data type for the entity
050: static String getEntityStateDataTypeDescription(String pEntityName) {
051: return "Represents state attribute for the " + pEntityName
052: + " entity instances.";
053: }
054:
055: // Helper. Returns the name of the ordering instruction data type for the entity
056: static String getOrderingInstructionDataTypeName(String pEntityName) {
057: return pEntityName + "OrderingInstruction";
058: }
059:
060: // Helper. Returns the description of the ordering instruction data type for the entity
061: static String getOrderingInstructionDataTypeDescription(
062: String pEntityName) {
063: return "Represents all possible ordering instructions for the "
064: + pEntityName + " entity collections.";
065: }
066:
067: // Helper. Returns the name of the category of ordering instructions by attribute
068: static String getOrderByAttributeCategoryName(String pAttributeName) {
069: return "By" + pAttributeName;
070: }
071:
072: // Helper. Returns the description of the category of ordering instructions by attribute
073: static String getOrderByAttributeCategoryDescription(
074: String pAttributeName) {
075: return "All ordering instructions involving " + pAttributeName
076: + " attribute";
077: }
078:
079: // Helper. Returns the name of the category of ordering instructions by state attribute
080: static String getOrderByStateAttributeCategoryName(
081: String pStateAttributeName) {
082: // No difference to normal attribute
083: return getOrderByAttributeCategoryName(pStateAttributeName);
084: }
085:
086: // Helper. Returns the description of the category of ordering instructions by attribute
087: static String getOrderByStateAttributeCategoryDescription(
088: String pStateAttributeName) {
089: return "All ordering instructions involving "
090: + pStateAttributeName
091: + " attribute which represents entity state.";
092: }
093:
094: // Helper. Returns the name of the value representing ascending ordering instructions by attribute
095: static String getAscendingOrderByAttributeValueName(
096: String pAttributeName) {
097: return "By " + pAttributeName + " In Ascending Order";
098: }
099:
100: // Helper. Returns the description of the value representing ascending ordering instructions by attribute
101: static String getAscendingOrderByAttributeValueDescription(
102: String pAttributeName) {
103: return "Denotes the ascending sort based on value of the "
104: + pAttributeName + " attribute.";
105: }
106:
107: // Helper. Returns the name of the value representing descending ordering instructions by attribute
108: static String getDescendingOrderByAttributeValueName(
109: String pAttributeName) {
110: return "By " + pAttributeName + " In Descending Order";
111: }
112:
113: // Helper. Returns the description of the value representing descending ordering instructions by attribute
114: static String getDescendingOrderByAttributeValueDescription(
115: String pAttributeName) {
116: return "Denotes the descending sort based on value of the "
117: + pAttributeName + " attribute.";
118: }
119:
120: // Helper. Returns the description of the system data types namespace
121: static String getSystemNamespaceDescription() {
122: return "This Namespace is reserved for implicit data types and type templates used in the system.";
123: }
124:
125: // Helper. Returns the description of the system data types namespace
126: static String getDomainNamespaceDescription(String pDomainName) {
127: return "This Namespace is reserved for implicit data types and type templates used in the '"
128: + pDomainName + "' domain.";
129: }
130:
131: // Helper. Returns the name of the value representing ascending ordering instructions by state attribute
132: static String getAscendingOrderByStateAttributeValueName(
133: String pStateAttributeName) {
134: return getAscendingOrderByAttributeValueName(pStateAttributeName);
135: }
136:
137: // Helper. Returns the description of the value representing ascending ordering instructions by state attribute
138: static String getAscendingOrderByStateAttributeValueDescription(
139: String pStateAttributeName) {
140: return "Denotes the ascending sort based on value of the "
141: + pStateAttributeName
142: + " attribute which represents entity state.";
143: }
144:
145: // Helper. Returns the name of the value representing descending ordering instructions by state attribute
146: static String getDescendingOrderByStateAttributeValueName(
147: String pStateAttributeName) {
148: return getDescendingOrderByAttributeValueName(pStateAttributeName);
149: }
150:
151: // Helper. Returns the description of the value representing descending ordering instructions by state attribute
152: static String getDescendingOrderByStateAttributeValueDescription(
153: String pStateAttributeName) {
154: return "Denotes the descending sort based on value of the "
155: + pStateAttributeName
156: + " attribute which represents entity state.";
157: }
158: }
|