From 836328ea2ca7c6780307abf258503201c91e5a96 Mon Sep 17 00:00:00 2001 From: lresende Date: Tue, 10 Nov 2009 19:20:03 +0000 Subject: moving SDO branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@834615 13f79535-47bb-0310-9956-ffa450edef68 --- .../util/metadata/impl/SDOMetaDataGroupImpl.java | 285 +++++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 sdo-java/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/SDOMetaDataGroupImpl.java (limited to 'sdo-java/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/SDOMetaDataGroupImpl.java') diff --git a/sdo-java/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/SDOMetaDataGroupImpl.java b/sdo-java/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/SDOMetaDataGroupImpl.java new file mode 100644 index 0000000000..43746399fc --- /dev/null +++ b/sdo-java/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/SDOMetaDataGroupImpl.java @@ -0,0 +1,285 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.apache.tuscany.sdo.util.metadata.impl; + +import commonj.sdo.Type; + +import java.util.Collection; +import java.util.List; + +import org.apache.tuscany.sdo.impl.DataObjectBase; + +import org.apache.tuscany.sdo.util.metadata.JavaMetaData; +import org.apache.tuscany.sdo.util.metadata.MetadataFactory; +import org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup; +import org.apache.tuscany.sdo.util.metadata.TypeMetaData; +import org.apache.tuscany.sdo.util.metadata.XSDMetaData; + +/** + * + * An implementation of the model object 'SDO Meta Data Group'. + * + *

+ * The following features are implemented: + *

+ *

+ * + * @generated + */ +public class SDOMetaDataGroupImpl extends DataObjectBase implements SDOMetaDataGroup +{ + /** + * The feature id for the 'Java Meta Data' containment reference list. + * + * + * @generated + * @ordered + */ + public final static int JAVA_META_DATA = 0; + + /** + * The feature id for the 'Xsd Meta Data' containment reference list. + * + * + * @generated + * @ordered + */ + public final static int XSD_META_DATA = 1; + + /** + * The feature id for the 'Type Meta Data' containment reference list. + * + * + * @generated + * @ordered + */ + public final static int TYPE_META_DATA = 2; + + /** + * This represents the number of properties for this type. + * + * + * @generated + * @ordered + */ + + public final static int SDO_PROPERTY_COUNT = 3; + + /** + * The cached value of the '{@link #getJavaMetaData() Java Meta Data}' containment reference list. + * + * + * @see #getJavaMetaData() + * @generated + * @ordered + */ + + protected List javaMetaData = null; + + /** + * The cached value of the '{@link #getXsdMetaData() Xsd Meta Data}' containment reference list. + * + * + * @see #getXsdMetaData() + * @generated + * @ordered + */ + + protected List xsdMetaData = null; + + /** + * The cached value of the '{@link #getTypeMetaData() Type Meta Data}' containment reference list. + * + * + * @see #getTypeMetaData() + * @generated + * @ordered + */ + + protected List typeMetaData = null; + + /** + * + * + * @generated + */ + protected SDOMetaDataGroupImpl() + { + super(); + } + + /** + * + * + * @generated + */ + public Type getStaticType() + { + return ((MetadataFactoryImpl)MetadataFactory.INSTANCE).getSDOMetaDataGroup(); + } + + /** + * + * + * @generated + */ + public List getJavaMetaData() + { + if (javaMetaData == null) + { + javaMetaData = createPropertyList(ListKind.CONTAINMENT, JavaMetaData.class, JAVA_META_DATA); + } + return javaMetaData; + } + /** + * + * + * @generated + */ + public List getXsdMetaData() + { + if (xsdMetaData == null) + { + xsdMetaData = createPropertyList(ListKind.CONTAINMENT, XSDMetaData.class, XSD_META_DATA); + } + return xsdMetaData; + } + /** + * + * + * @generated + */ + public List getTypeMetaData() + { + if (typeMetaData == null) + { + typeMetaData = createPropertyList(ListKind.CONTAINMENT, TypeMetaData.class, TYPE_META_DATA); + } + return typeMetaData; + } + /** + * + * + * @generated + */ + public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) + { + switch (propertyIndex) + { + case JAVA_META_DATA: + return removeFromList(getJavaMetaData(), otherEnd, changeContext); + case XSD_META_DATA: + return removeFromList(getXsdMetaData(), otherEnd, changeContext); + case TYPE_META_DATA: + return removeFromList(getTypeMetaData(), otherEnd, changeContext); + } + return super.inverseRemove(otherEnd, propertyIndex, changeContext); + } + + /** + * + * + * @generated + */ + public Object get(int propertyIndex, boolean resolve) + { + switch (propertyIndex) + { + case JAVA_META_DATA: + return getJavaMetaData(); + case XSD_META_DATA: + return getXsdMetaData(); + case TYPE_META_DATA: + return getTypeMetaData(); + } + return super.get(propertyIndex, resolve); + } + + /** + * + * + * @generated + */ + public void set(int propertyIndex, Object newValue) + { + switch (propertyIndex) + { + case JAVA_META_DATA: + getJavaMetaData().clear(); + getJavaMetaData().addAll((Collection)newValue); + return; + case XSD_META_DATA: + getXsdMetaData().clear(); + getXsdMetaData().addAll((Collection)newValue); + return; + case TYPE_META_DATA: + getTypeMetaData().clear(); + getTypeMetaData().addAll((Collection)newValue); + return; + } + super.set(propertyIndex, newValue); + } + + /** + * + * + * @generated + */ + public void unset(int propertyIndex) + { + switch (propertyIndex) + { + case JAVA_META_DATA: + getJavaMetaData().clear(); + return; + case XSD_META_DATA: + getXsdMetaData().clear(); + return; + case TYPE_META_DATA: + getTypeMetaData().clear(); + return; + } + super.unset(propertyIndex); + } + + /** + * + * + * @generated + */ + public boolean isSet(int propertyIndex) + { + switch (propertyIndex) + { + case JAVA_META_DATA: + return javaMetaData != null && !javaMetaData.isEmpty(); + case XSD_META_DATA: + return xsdMetaData != null && !xsdMetaData.isEmpty(); + case TYPE_META_DATA: + return typeMetaData != null && !typeMetaData.isEmpty(); + } + return super.isSet(propertyIndex); + } + +} //SDOMetaDataGroupImpl -- cgit v1.2.3