Issue #1829 Refactored EBXML registry objects

Change-Id: I0f1b2ecbac19cdc2304680d4dbdfb5d963f0649d

Former-commit-id: 6eb387e69c2fc4837b58f99e4343a745162fb384
This commit is contained in:
Benjamin Phillippe 2013-12-03 09:55:59 -06:00
parent 20eeb2796e
commit ed77440c28
138 changed files with 5785 additions and 1336 deletions

View file

@ -19,7 +19,7 @@
**/
package com.raytheon.uf.common.datadelivery.registry.ebxml;
import java.util.Set;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -48,6 +48,7 @@ import com.raytheon.uf.common.time.util.ImmutableDate;
* ------------ ---------- ----------- --------------------------
* Aug 15, 2012 0743 djohnson Initial creation
* Jun 24, 2013 2106 djohnson Pass encoder to result formatters.
* 12/2/2013 1829 bphillip Changed slot field in ExtensibleObjectType to be List instead of Set
*
* </pre>
*
@ -58,8 +59,7 @@ import com.raytheon.uf.common.time.util.ImmutableDate;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public class DataSetMetaDataDatesQuery extends
DataSetMetaDataFilterableQuery<ImmutableDate>
implements
DataSetMetaDataFilterableQuery<ImmutableDate> implements
IResultFormatter<ImmutableDate> {
/**
@ -67,14 +67,13 @@ public class DataSetMetaDataDatesQuery extends
*/
@Override
public ImmutableDate decodeObject(RegistryObjectType registryObjectType,
IRegistryEncoder encoder)
throws SerializationException {
Set<SlotType> returnedSlots = registryObjectType.getSlot();
IRegistryEncoder encoder) throws SerializationException {
List<SlotType> returnedSlots = registryObjectType.getSlot();
for (SlotType s : returnedSlots) {
if (DataSetMetaData.DATE_SLOT.equals(s.getName())) {
IntegerValueType value = (IntegerValueType) s.getSlotValue();
return new ImmutableDate(value.getValue().longValue());
return new ImmutableDate(value.getIntegerValue().longValue());
}
}

View file

@ -1,6 +1,6 @@
package com.raytheon.uf.common.datadelivery.registry.ebxml;
import java.util.Set;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -31,6 +31,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* Aug 02, 2012 955 djohnson Add generics and results retrieval to registry queries.
* Aug 15, 2012 0743 djohnson Type-safe result formatters.
* Jun 24, 2013 2106 djohnson Pass encoder to result formatters.
* 12/2/2013 1829 bphillip Changed slot field in ExtensibleObjectType to be List instead of Set
*
* </pre>
*
@ -65,7 +66,7 @@ public class DataSetNameQuery extends
String object = null;
Set<SlotType> returnedSlots = registryObjectType.getSlot();
List<SlotType> returnedSlots = registryObjectType.getSlot();
// Cherry pick the values to return...
for (SlotType s : returnedSlots) {

View file

@ -1,6 +1,6 @@
package com.raytheon.uf.common.datadelivery.registry.ebxml;
import java.util.Set;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -25,6 +25,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* Jan 02, 2013 1441 djohnson Initial creation
* Jun 24, 2013 2106 djohnson Pass encoder to result formatters.
* 12/2/2013 1829 bphillip Changed slot field in ExtensibleObjectType to be List instead of Set
*
* </pre>
*
@ -39,7 +40,7 @@ public class GroupNameQuery extends GroupDefinitionFilterableQuery<String>
public String decodeObject(RegistryObjectType registryObjectType,
IRegistryEncoder encoder) {
Set<SlotType> returnedSlots = registryObjectType.getSlot();
List<SlotType> returnedSlots = registryObjectType.getSlot();
// Cherry pick the values to return...
for (SlotType s : returnedSlots) {

View file

@ -1,6 +1,6 @@
package com.raytheon.uf.common.datadelivery.registry.ebxml;
import java.util.Set;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -26,6 +26,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* Aug 02, 2012 955 djohnson Add generics and results retrieval to registry queries.
* Aug 15, 2012 0743 djohnson Type-safe result formatters.
* Jun 24, 2013 2106 djohnson Pass encoder to result formatters.
* 12/2/2013 1829 bphillip Changed slot field in ExtensibleObjectType to be List instead of Set
*
* </pre>
*
@ -42,7 +43,7 @@ public class ParameterNameQuery extends ParameterFilterableQuery<String>
String object = null;
Set<SlotType> returnedSlots = registryObjectType.getSlot();
List<SlotType> returnedSlots = registryObjectType.getSlot();
// Cherry pick the values to return...
for (SlotType s : returnedSlots) {

View file

@ -19,7 +19,7 @@
**/
package com.raytheon.uf.common.datadelivery.registry.ebxml;
import java.util.Set;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -47,6 +47,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Aug 24, 2012 0743 djohnson Initial creation
* Jun 24, 2013 2106 djohnson Pass encoder to result formatters.
* Jul 18, 2013 2193 mpduff Updated to work with site and shared subscriptions.
* 12/2/2013 1829 bphillip Changed slot field in ExtensibleObjectType to be List instead of Set
*
* </pre>
*
@ -89,7 +90,7 @@ public class SubscriptionDataSetNameQuery extends
@Override
public String decodeObject(RegistryObjectType registryObjectType,
IRegistryEncoder encoderStrategy) throws SerializationException {
Set<SlotType> returnedSlots = registryObjectType.getSlot();
List<SlotType> returnedSlots = registryObjectType.getSlot();
// Cherry pick the values to return...
for (SlotType s : returnedSlots) {

View file

@ -58,16 +58,6 @@ public interface IRegistryFederationService {
@Path("isFederated")
public String isFederated();
/**
* Gets if this registry is processing registry replication subscriptions
*
* @return The value of the EBXML_REGISTRY_SUBSCRIPTIONS_ENABLED environment
* variable
*/
@GET
@Path("isProcessingSubscriptions")
public String isProcessingSubscriptions();
/**
* Gets information about this registry
*

View file

@ -19,7 +19,7 @@
**/
package com.raytheon.uf.common.registry.ebxml.encoder;
import java.util.Set;
import java.util.List;
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectType;
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotType;
@ -44,6 +44,7 @@ import com.raytheon.uf.common.serialization.SerializationException;
* ------------ ---------- ----------- --------------------------
* Sep 07, 2012 1102 djohnson Initial creation
* Jun 03, 2013 2038 djohnson Add equals/hashcode.
* 12/2/2013 1829 bphillip Changed slot field in ExtensibleObjectType to be List instead of Set
*
* </pre>
*
@ -79,7 +80,7 @@ abstract class ContentSlotBasedEncoder<SLOT_VALUE_TYPE extends ValueType, CONTEN
throws SerializationException {
Object object = null;
Set<SlotType> returnedSlots = registryObjectType.getSlot();
List<SlotType> returnedSlots = registryObjectType.getSlot();
// Walk the returned slots looking for the "content" slot
for (SlotType s : returnedSlots) {
if (CONTENT_SLOT.equals(s.getName())) {

View file

@ -7,18 +7,20 @@ import oasis.names.tc.ebxml.regrep.xsd.rim.v4.FloatValueType;
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotType;
/**
* A <code>SlotConverter</code> implementation for converting a
* double or float attribute into a RegistryObject slot type.
* A <code>SlotConverter</code> implementation for converting a double or float
* attribute into a RegistryObject slot type.
*
* <pre>
*
*
* SOFTWARE HISTORY
*
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 15, 2012 355 jspinks Initial creation
*
* 12/2/2013 1829 bphillip Removed generic setValue method on ValueType
*
* </pre>
*
*
* @author jspinks
* @version 1.0
*/
@ -33,8 +35,8 @@ public class DoubleSlotConverter implements SlotConverter {
* The name to use for each SlotType created.
*
* @param slotValue
* The Object that is to be interrogated for slot values. Must
* be a double or float.
* The Object that is to be interrogated for slot values. Must be
* a double or float.
*
* @return A FloatValueType slot for the provided slotValue parameter.
*
@ -44,25 +46,25 @@ public class DoubleSlotConverter implements SlotConverter {
*
*/
@Override
public List<SlotType> getSlots(String slotName, Object slotValue) throws IllegalArgumentException {
public List<SlotType> getSlots(String slotName, Object slotValue)
throws IllegalArgumentException {
List<SlotType> slots = new ArrayList<SlotType>();
if (slotValue instanceof Double ||
slotValue instanceof Float) {
if (slotValue instanceof Double || slotValue instanceof Float) {
SlotType slot = new SlotType();
FloatValueType sv = new FloatValueType();
slot.setName(slotName);
sv.setValue(((Double)slotValue).floatValue());
sv.setFloatValue(((Double) slotValue).floatValue());
slot.setSlotValue(sv);
slots.add(slot);
}
else {
throw new IllegalArgumentException("Object of type " + slotValue.getClass().getName() +
" cannot be converted by " + DoubleSlotConverter.class.getName());
} else {
throw new IllegalArgumentException("Object of type "
+ slotValue.getClass().getName()
+ " cannot be converted by "
+ DoubleSlotConverter.class.getName());
}
return slots;
}
}

View file

@ -1,3 +1,22 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.common.registry.ebxml.slots;
import java.math.BigInteger;
@ -7,32 +26,47 @@ import java.util.List;
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.IntegerValueType;
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotType;
/**
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 2013 Initial Creation
* 12/2/2013 1829 bphillip Removed generic setValue method on ValueType
*
* </pre>
*
* @author bphillip
* @version 1
**/
public class IntegerSlotConverter implements SlotConverter {
public static final SlotConverter INSTANCE = new IntegerSlotConverter();
@Override
public List<SlotType> getSlots(String slotName, Object slotValue) throws IllegalArgumentException {
public List<SlotType> getSlots(String slotName, Object slotValue)
throws IllegalArgumentException {
List<SlotType> slots = new ArrayList<SlotType>();
// Integer slot will accommodate integer, long and BigInteger types...
if (slotValue instanceof Integer ||
slotValue instanceof BigInteger ||
slotValue instanceof Long) {
if (slotValue instanceof Integer || slotValue instanceof BigInteger
|| slotValue instanceof Long) {
SlotType slot = new SlotType();
IntegerValueType sv = new IntegerValueType();
slot.setName(slotName);
sv.setValue(new BigInteger(slotValue.toString().trim()));
sv.setIntegerValue(new BigInteger(slotValue.toString().trim()));
slot.setSlotValue(sv);
slots.add(slot);
}
else {
throw new IllegalArgumentException("Object of type " + slotValue.getClass().getName() +
" cannot be converted by " + IntegerSlotConverter.class.getName());
} else {
throw new IllegalArgumentException("Object of type "
+ slotValue.getClass().getName()
+ " cannot be converted by "
+ IntegerSlotConverter.class.getName());
}
return slots;
}
}

View file

@ -22,6 +22,10 @@ package com.raytheon.uf.common.registry.services;
import java.lang.reflect.Proxy;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
@ -36,6 +40,9 @@ import org.apache.cxf.transport.http.HTTPConduit;
import org.apache.cxf.transports.http.configuration.ConnectionType;
import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.common.io.Resources;
import com.raytheon.uf.common.comm.ProxyConfiguration;
import com.raytheon.uf.common.registry.RegistryJaxbManager;
@ -60,6 +67,7 @@ import com.raytheon.uf.common.registry.services.rest.IRepositoryItemsRestService
* 9/5/2013 1538 bphillip Changed cache expiration timeout and added http header
* 10/30/2013 1538 bphillip Moved data delivery services out of registry plugin
* 11/20/2013 2534 bphillip Added HTTPClient policy for rest connections. Eliminated service caching.
* 12/2/2013 1829 bphillip Removed expectedType argument on getRegistryObject method
* </pre>
*
* @author bphillip
@ -91,6 +99,8 @@ public class RegistryRESTServices {
}
}
private Map<Class<?>, LoadingCache<String, ?>> serviceCache = new HashMap<Class<?>, LoadingCache<String, ?>>();
public RegistryRESTServices() throws JAXBException {
jaxbManager = new RegistryJaxbManager(new RegistryNamespaceMapper());
}
@ -121,9 +131,8 @@ public class RegistryRESTServices {
* If errors occur while serializing the object
*/
@SuppressWarnings("unchecked")
public <T extends RegistryObjectType> T getRegistryObject(
Class<T> expectedType, String baseURL, String objectId)
throws JAXBException, RegistryServiceException {
public <T extends RegistryObjectType> T getRegistryObject(String baseURL,
String objectId) throws JAXBException, RegistryServiceException {
String objStr = getRegistryObjectService(baseURL).getRegistryObject(
objectId);
Object retVal = jaxbManager.unmarshalFromXml(objStr);
@ -185,8 +194,30 @@ public class RegistryRESTServices {
}
}
protected <T extends Object> T getPort(String url, Class<T> serviceClass) {
@SuppressWarnings("unchecked")
protected <T extends Object> T getPort(String serviceUrl,
final Class<T> serviceInterface) {
LoadingCache<String, ?> cache = serviceCache.get(serviceInterface);
if (cache == null) {
cache = CacheBuilder.newBuilder()
.expireAfterAccess(1, TimeUnit.MINUTES)
.build(new CacheLoader<String, T>() {
public T load(String key) {
return createService(key, serviceInterface);
}
});
serviceCache.put(serviceInterface, cache);
}
try {
return (T) cache.get(serviceUrl);
} catch (ExecutionException e) {
throw new RuntimeException("Error getting service at ["
+ serviceUrl + "]", e);
}
}
protected <T extends Object> T createService(String url,
Class<T> serviceClass) {
T service = JAXRSClientFactory.create(url, serviceClass);
Client client = (Client) Proxy.getInvocationHandler((Proxy) service);
ClientConfiguration config = WebClient.getConfig(service);

View file

@ -27,6 +27,8 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
@ -49,6 +51,9 @@ import org.apache.cxf.transport.http.HTTPConduit;
import org.apache.cxf.transports.http.configuration.ConnectionType;
import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.raytheon.uf.common.comm.ProxyConfiguration;
import com.raytheon.uf.common.comm.ProxyUtil;
import com.raytheon.uf.common.localization.PathManagerFactory;
@ -144,6 +149,8 @@ public class RegistrySOAPServices {
}
}
private Map<Class<?>, LoadingCache<String, ?>> serviceCache = new HashMap<Class<?>, LoadingCache<String, ?>>();
/**
* Gets the notification listener service URL for the given host
*
@ -330,7 +337,7 @@ public class RegistrySOAPServices {
}
@SuppressWarnings("unchecked")
private <T extends Object> T getPort(String serviceUrl,
private <T extends Object> T createService(String serviceUrl,
Class<?> serviceInterface) throws RegistryServiceException {
W3CEndpointReferenceBuilder endpointBuilder = new W3CEndpointReferenceBuilder();
endpointBuilder.wsdlDocumentLocation(serviceUrl.toString() + WSDL);
@ -348,6 +355,28 @@ public class RegistrySOAPServices {
return port;
}
@SuppressWarnings("unchecked")
private <T extends Object> T getPort(String serviceUrl,
final Class<T> serviceInterface) {
LoadingCache<String, ?> cache = serviceCache.get(serviceInterface);
if (cache == null) {
cache = CacheBuilder.newBuilder()
.expireAfterAccess(1, TimeUnit.MINUTES)
.build(new CacheLoader<String, T>() {
public T load(String key) {
return createService(key, serviceInterface);
}
});
serviceCache.put(serviceInterface, cache);
}
try {
return (T) cache.get(serviceUrl);
} catch (ExecutionException e) {
throw new RuntimeException("Error getting service at ["
+ serviceUrl + "]", e);
}
}
/**
* Gets the proxy configuration
*

View file

@ -20,8 +20,13 @@
package oasis.names.tc.ebxml.regrep.xsd.lcm.v4;
import java.util.Collection;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -35,7 +40,11 @@ import oasis.names.tc.ebxml.regrep.xsd.rim.v4.QueryType;
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotType;
import oasis.names.tc.ebxml.regrep.xsd.rs.v4.RegistryRequestType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.EbxmlNamespaces;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -71,6 +80,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Added Hibernate annotations
* </pre>
*
* @author bphillip
@ -80,14 +90,22 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlType(name = "", propOrder = { "query", "objectRefList" })
@XmlRootElement(name = "RemoveObjectsRequest")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "RemoveObjectsRequest")
public class RemoveObjectsRequest extends RegistryRequestType {
private static final long serialVersionUID = 654608816540789417L;
@XmlElement(name = "Query")
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "query_id", referencedColumnName = "id")
protected QueryType query;
@XmlElement(name = "ObjectRefList", namespace = EbxmlNamespaces.RIM_URI)
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
protected ObjectRefListType objectRefList;
@XmlAttribute
@ -108,11 +126,11 @@ public class RemoveObjectsRequest extends RegistryRequestType {
protected String username;
public RemoveObjectsRequest() {
super();
}
public RemoveObjectsRequest(String id, String comment,
Collection<SlotType> slots, QueryType query,
List<SlotType> slots, QueryType query,
ObjectRefListType objectRefList, Boolean checkReferences,
Boolean deleteChildren, String deletionScope) {
super(id, comment, slots);
@ -248,4 +266,89 @@ public class RemoveObjectsRequest extends RegistryRequestType {
this.username = username;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((checkReferences == null) ? 0 : checkReferences.hashCode());
result = prime * result
+ ((deleteChildren == null) ? 0 : deleteChildren.hashCode());
result = prime * result
+ ((deletionScope == null) ? 0 : deletionScope.hashCode());
result = prime * result
+ ((objectRefList == null) ? 0 : objectRefList.hashCode());
result = prime * result + ((query == null) ? 0 : query.hashCode());
result = prime * result
+ ((username == null) ? 0 : username.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
RemoveObjectsRequest other = (RemoveObjectsRequest) obj;
if (checkReferences == null) {
if (other.checkReferences != null)
return false;
} else if (!checkReferences.equals(other.checkReferences))
return false;
if (deleteChildren == null) {
if (other.deleteChildren != null)
return false;
} else if (!deleteChildren.equals(other.deleteChildren))
return false;
if (deletionScope == null) {
if (other.deletionScope != null)
return false;
} else if (!deletionScope.equals(other.deletionScope))
return false;
if (objectRefList == null) {
if (other.objectRefList != null)
return false;
} else if (!objectRefList.equals(other.objectRefList))
return false;
if (query == null) {
if (other.query != null)
return false;
} else if (!query.equals(other.query))
return false;
if (username == null) {
if (other.username != null)
return false;
} else if (!username.equals(other.username))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("RemoveObjectsRequest \n[comment=");
builder.append(comment);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nquery=");
builder.append(query);
builder.append(", \nobjectRefList=");
builder.append(objectRefList);
builder.append(", \ncheckReferences=");
builder.append(checkReferences);
builder.append(", \ndeleteChildren=");
builder.append(deleteChildren);
builder.append(", \ndeletionScope=");
builder.append(deletionScope);
builder.append(", \nusername=");
builder.append(username);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,9 +20,12 @@
package oasis.names.tc.ebxml.regrep.xsd.lcm.v4;
import java.util.Collection;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@ -35,7 +38,11 @@ import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectType;
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotType;
import oasis.names.tc.ebxml.regrep.xsd.rs.v4.RegistryRequestType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.EbxmlNamespaces;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -69,6 +76,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Added Hibernate annotations
* </pre>
*
* @author bphillip
@ -78,10 +86,16 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlType(name = "", propOrder = { "registryObjectList" })
@XmlRootElement(name = "SubmitObjectsRequest")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "SubmitObjectsRequest")
public class SubmitObjectsRequest extends RegistryRequestType {
private static final long serialVersionUID = -6900232373438206618L;
@XmlElement(name = "RegistryObjectList", namespace = EbxmlNamespaces.RIM_URI)
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
protected RegistryObjectListType registryObjectList;
@XmlAttribute
@ -93,13 +107,12 @@ public class SubmitObjectsRequest extends RegistryRequestType {
protected Mode mode;
public SubmitObjectsRequest() {
super();
}
public SubmitObjectsRequest(String id, String comment,
Collection<SlotType> slots,
RegistryObjectListType registryObjectList, Boolean checkReferences,
Mode mode) {
List<SlotType> slots, RegistryObjectListType registryObjectList,
Boolean checkReferences, Mode mode) {
super(id, comment, slots);
this.registryObjectList = registryObjectList;
this.checkReferences = checkReferences;
@ -189,4 +202,61 @@ public class SubmitObjectsRequest extends RegistryRequestType {
this.mode = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((checkReferences == null) ? 0 : checkReferences.hashCode());
result = prime * result + ((mode == null) ? 0 : mode.hashCode());
result = prime
* result
+ ((registryObjectList == null) ? 0 : registryObjectList
.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
SubmitObjectsRequest other = (SubmitObjectsRequest) obj;
if (checkReferences == null) {
if (other.checkReferences != null)
return false;
} else if (!checkReferences.equals(other.checkReferences))
return false;
if (mode != other.mode)
return false;
if (registryObjectList == null) {
if (other.registryObjectList != null)
return false;
} else if (!registryObjectList.equals(other.registryObjectList))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("SubmitObjectsRequest \n[comment=");
builder.append(comment);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nregistryObjectList=");
builder.append(registryObjectList);
builder.append(", \ncheckReferences=");
builder.append(checkReferences);
builder.append(", \nmode=");
builder.append(mode);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,6 +20,10 @@
package oasis.names.tc.ebxml.regrep.xsd.lcm.v4;
import javax.persistence.CascadeType;
import javax.persistence.Embeddable;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@ -73,6 +77,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Added Hibernate annotations
* </pre>
*
* @author bphillip
@ -82,6 +87,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "UpdateActionType", propOrder = { "valueHolder", "selector" })
@DynamicSerialize
@Embeddable
public class UpdateActionType {
public enum UPDATE_MODE {
@ -90,10 +96,14 @@ public class UpdateActionType {
@XmlElement(name = "ValueHolder")
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "valueHolder_id", referencedColumnName = "id")
protected ValueType valueHolder;
@XmlElement(name = "Selector", required = true)
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "selector_id", referencedColumnName = "id")
protected QueryExpressionType selector;
@XmlAttribute(required = true)

View file

@ -21,9 +21,14 @@
package oasis.names.tc.ebxml.regrep.xsd.lcm.v4;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@ -36,7 +41,11 @@ import oasis.names.tc.ebxml.regrep.xsd.rim.v4.QueryType;
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotType;
import oasis.names.tc.ebxml.regrep.xsd.rs.v4.RegistryRequestType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.EbxmlNamespaces;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -72,6 +81,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Added Hibernate annotations
* </pre>
*
* @author bphillip
@ -81,18 +91,27 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlType(name = "", propOrder = { "query", "objectRefList", "updateAction" })
@XmlRootElement(name = "UpdateObjectsRequest")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "UpdateObjectsRequest")
public class UpdateObjectsRequest extends RegistryRequestType {
private static final long serialVersionUID = 2714648132054313507L;
@XmlElement(name = "Query")
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "query_id", referencedColumnName = "id")
protected QueryType query;
@XmlElement(name = "ObjectRefList", namespace = EbxmlNamespaces.RIM_URI)
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
protected ObjectRefListType objectRefList;
@XmlElement(name = "UpdateAction", required = true)
@DynamicSerializeElement
@Embedded
protected List<UpdateActionType> updateAction;
@XmlAttribute
@ -104,11 +123,11 @@ public class UpdateObjectsRequest extends RegistryRequestType {
protected Mode mode;
public UpdateObjectsRequest() {
super();
}
public UpdateObjectsRequest(String id, String comment,
Collection<SlotType> slots, QueryType query,
List<SlotType> slots, QueryType query,
ObjectRefListType objectRefList,
List<UpdateActionType> updateAction, Boolean checkReferences,
Mode mode) {
@ -250,4 +269,76 @@ public class UpdateObjectsRequest extends RegistryRequestType {
this.mode = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((checkReferences == null) ? 0 : checkReferences.hashCode());
result = prime * result + ((mode == null) ? 0 : mode.hashCode());
result = prime * result
+ ((objectRefList == null) ? 0 : objectRefList.hashCode());
result = prime * result + ((query == null) ? 0 : query.hashCode());
result = prime * result
+ ((updateAction == null) ? 0 : updateAction.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
UpdateObjectsRequest other = (UpdateObjectsRequest) obj;
if (checkReferences == null) {
if (other.checkReferences != null)
return false;
} else if (!checkReferences.equals(other.checkReferences))
return false;
if (mode != other.mode)
return false;
if (objectRefList == null) {
if (other.objectRefList != null)
return false;
} else if (!objectRefList.equals(other.objectRefList))
return false;
if (query == null) {
if (other.query != null)
return false;
} else if (!query.equals(other.query))
return false;
if (updateAction == null) {
if (other.updateAction != null)
return false;
} else if (!updateAction.equals(other.updateAction))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("UpdateObjectsRequest \n[comment=");
builder.append(comment);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nquery=");
builder.append(query);
builder.append(", \nobjectRefList=");
builder.append(objectRefList);
builder.append(", \nupdateAction=");
builder.append(updateAction);
builder.append(", \ncheckReferences=");
builder.append(checkReferences);
builder.append(", \nmode=");
builder.append(mode);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,6 +20,8 @@
package oasis.names.tc.ebxml.regrep.xsd.query.v4;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@ -27,6 +29,10 @@ import javax.xml.bind.annotation.XmlType;
import oasis.names.tc.ebxml.regrep.xsd.rs.v4.RegistryExceptionType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
@ -56,6 +62,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Added Hibernate annotations
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -65,6 +75,19 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "QueryExceptionType")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA)
public class QueryExceptionType extends RegistryExceptionType {
/**
*
*/
private static final long serialVersionUID = 6580264492439969629L;
public QueryExceptionType() {
super();
}
}

View file

@ -22,6 +22,12 @@ package oasis.names.tc.ebxml.regrep.xsd.query.v4;
import java.math.BigInteger;
import javax.persistence.CascadeType;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@ -33,6 +39,10 @@ import javax.xml.bind.annotation.XmlType;
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.QueryType;
import oasis.names.tc.ebxml.regrep.xsd.rs.v4.RegistryRequestType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -74,6 +84,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 10/23/2013 1538 bphillip Removed unused constructors
* 12/2/2013 1829 bphillip Added Hibernate annotations
* </pre>
*
* @author bphillip
@ -83,8 +94,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlType(name = "", propOrder = { "responseOption", "query" })
@XmlRootElement(name = "QueryRequest")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "QueryRequest")
public class QueryRequest extends RegistryRequestType {
private static final long serialVersionUID = 1069976228999283284L;
/** The queryID canonical query parameter name */
public static final String QUERY_ID = "queryId";
@ -132,10 +148,13 @@ public class QueryRequest extends RegistryRequestType {
@XmlElement(name = "ResponseOption", required = true)
@DynamicSerializeElement
@Embedded
protected ResponseOptionType responseOption;
@XmlElement(name = "Query", required = true)
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "query_id", referencedColumnName = "id")
protected QueryType query;
@XmlAttribute
@ -172,7 +191,7 @@ public class QueryRequest extends RegistryRequestType {
protected Boolean matchOlderVersions;
public QueryRequest() {
super();
}
public QueryRequest(String id, QueryType query,
@ -184,20 +203,35 @@ public class QueryRequest extends RegistryRequestType {
@Override
public String toString() {
StringBuilder strBuilder = new StringBuilder();
strBuilder.append("\tQueryType: [").append(query.getQueryDefinition())
.append("]");
strBuilder.append("\tId: [").append(id).append("]");
strBuilder.append("\tFederated: [").append(federated).append("]");
strBuilder.append("\tFederation: [").append(federation).append("]");
strBuilder.append("\tFormat: [").append(format).append("]");
strBuilder.append("\tLang: [").append(lang).append("]");
strBuilder.append("\tStart Index: [").append(startIndex).append("]");
strBuilder.append("\tMax Results: [").append(maxResults).append("]");
strBuilder.append("\tDepth: [").append(depth).append("]");
strBuilder.append("\tMatch Older Versions: [")
.append(matchOlderVersions).append("]");
return strBuilder.toString();
StringBuilder builder = new StringBuilder();
builder.append("QueryRequest \n[comment=");
builder.append(comment);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nresponseOption=");
builder.append(responseOption);
builder.append(", \nquery=");
builder.append(query);
builder.append(", \nfederated=");
builder.append(federated);
builder.append(", \nfederation=");
builder.append(federation);
builder.append(", \nformat=");
builder.append(format);
builder.append(", \nlang=");
builder.append(lang);
builder.append(", \nstartIndex=");
builder.append(startIndex);
builder.append(", \nmaxResults=");
builder.append(maxResults);
builder.append(", \ndepth=");
builder.append(depth);
builder.append(", \nmatchOlderVersions=");
builder.append(matchOlderVersions);
builder.append("]");
return builder.toString();
}
/**
@ -434,4 +468,91 @@ public class QueryRequest extends RegistryRequestType {
this.matchOlderVersions = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((depth == null) ? 0 : depth.hashCode());
result = prime * result
+ ((federated == null) ? 0 : federated.hashCode());
result = prime * result
+ ((federation == null) ? 0 : federation.hashCode());
result = prime * result + ((format == null) ? 0 : format.hashCode());
result = prime * result + ((lang == null) ? 0 : lang.hashCode());
result = prime
* result
+ ((matchOlderVersions == null) ? 0 : matchOlderVersions
.hashCode());
result = prime * result
+ ((maxResults == null) ? 0 : maxResults.hashCode());
result = prime * result + ((query == null) ? 0 : query.hashCode());
result = prime * result
+ ((responseOption == null) ? 0 : responseOption.hashCode());
result = prime * result
+ ((startIndex == null) ? 0 : startIndex.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
QueryRequest other = (QueryRequest) obj;
if (depth == null) {
if (other.depth != null)
return false;
} else if (!depth.equals(other.depth))
return false;
if (federated == null) {
if (other.federated != null)
return false;
} else if (!federated.equals(other.federated))
return false;
if (federation == null) {
if (other.federation != null)
return false;
} else if (!federation.equals(other.federation))
return false;
if (format == null) {
if (other.format != null)
return false;
} else if (!format.equals(other.format))
return false;
if (lang == null) {
if (other.lang != null)
return false;
} else if (!lang.equals(other.lang))
return false;
if (matchOlderVersions == null) {
if (other.matchOlderVersions != null)
return false;
} else if (!matchOlderVersions.equals(other.matchOlderVersions))
return false;
if (maxResults == null) {
if (other.maxResults != null)
return false;
} else if (!maxResults.equals(other.maxResults))
return false;
if (query == null) {
if (other.query != null)
return false;
} else if (!query.equals(other.query))
return false;
if (responseOption == null) {
if (other.responseOption != null)
return false;
} else if (!responseOption.equals(other.responseOption))
return false;
if (startIndex == null) {
if (other.startIndex != null)
return false;
} else if (!startIndex.equals(other.startIndex))
return false;
return true;
}
}

View file

@ -22,6 +22,8 @@ package oasis.names.tc.ebxml.regrep.xsd.query.v4;
import java.math.BigInteger;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@ -30,6 +32,10 @@ import javax.xml.bind.annotation.XmlType;
import oasis.names.tc.ebxml.regrep.xsd.rs.v4.RegistryResponseType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -60,6 +66,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Added Hibernate annotations
* </pre>
*
* @author bphillip
@ -69,8 +76,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlType(name = "")
@XmlRootElement(name = "QueryResponse")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "QueryResponse")
public class QueryResponse extends RegistryResponseType {
private static final long serialVersionUID = 994857768186130811L;
@XmlAttribute
@DynamicSerializeElement
protected BigInteger startIndex;
@ -79,6 +91,10 @@ public class QueryResponse extends RegistryResponseType {
@DynamicSerializeElement
protected BigInteger totalResultCount;
public QueryResponse() {
super();
}
public void incrementResultCount(BigInteger resultCount) {
if (resultCount == null) {
return;
@ -135,4 +151,63 @@ public class QueryResponse extends RegistryResponseType {
this.totalResultCount = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((startIndex == null) ? 0 : startIndex.hashCode());
result = prime
* result
+ ((totalResultCount == null) ? 0 : totalResultCount.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
QueryResponse other = (QueryResponse) obj;
if (startIndex == null) {
if (other.startIndex != null)
return false;
} else if (!startIndex.equals(other.startIndex))
return false;
if (totalResultCount == null) {
if (other.totalResultCount != null)
return false;
} else if (!totalResultCount.equals(other.totalResultCount))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("QueryResponse \n[exception=");
builder.append(exception);
builder.append(", \nregistryObjectList=");
builder.append(registryObjectList);
builder.append(", \nobjectRefList=");
builder.append(objectRefList);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nrequestId=");
builder.append(requestId);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nstartIndex=");
builder.append(startIndex);
builder.append(", \ntotalResultCount=");
builder.append(totalResultCount);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,6 +20,7 @@
package oasis.names.tc.ebxml.regrep.xsd.query.v4;
import javax.persistence.Embeddable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@ -67,6 +68,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Added Hibernate annotations
* </pre>
*
* @author bphillip
@ -76,6 +78,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ResponseOptionType")
@DynamicSerialize
@Embeddable
public class ResponseOptionType {
/**
@ -178,4 +181,45 @@ public class ResponseOptionType {
this.returnComposedObjects = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime
* result
+ ((returnComposedObjects == null) ? 0 : returnComposedObjects
.hashCode());
result = prime * result
+ ((returnType == null) ? 0 : returnType.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
ResponseOptionType other = (ResponseOptionType) obj;
if (returnComposedObjects == null) {
if (other.returnComposedObjects != null)
return false;
} else if (!returnComposedObjects.equals(other.returnComposedObjects))
return false;
if (returnType == null) {
if (other.returnType != null)
return false;
} else if (!returnType.equals(other.returnType))
return false;
return true;
}
@Override
public String toString() {
return "ResponseOptionType [returnType=" + returnType
+ ", returnComposedObjects=" + returnComposedObjects + "]";
}
}

View file

@ -20,21 +20,15 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
@ -78,6 +72,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable, modified persistence annotations, added hashCode and equals
* </pre>
*
* @author bphillip
@ -91,20 +86,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Action")
public class ActionType extends ExtensibleObjectType implements Serializable {
public class ActionType extends ExtensibleObjectType {
private static final long serialVersionUID = -8469820571747325703L;
@Id
@SequenceGenerator(name = "ActionTypeGenerator", schema = RegrepUtil.EBXML_SCHEMA, sequenceName = RegrepUtil.EBXML_SCHEMA
+ ".Action_sequence")
@GeneratedValue(generator = "ActionTypeGenerator")
@XmlTransient
private Integer key;
@OneToOne(cascade = CascadeType.ALL)
@XmlElement(name = "AffectedObjects")
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
protected RegistryObjectListType affectedObjects;
@OneToOne(cascade = CascadeType.ALL)
@ -117,12 +105,67 @@ public class ActionType extends ExtensibleObjectType implements Serializable {
@RegistryObjectReference
protected String eventType;
public Integer getKey() {
return key;
public ActionType() {
super();
}
public void setKey(Integer key) {
this.key = key;
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime
* result
+ ((affectedObjectRefs == null) ? 0 : affectedObjectRefs
.hashCode());
result = prime * result
+ ((affectedObjects == null) ? 0 : affectedObjects.hashCode());
result = prime * result
+ ((eventType == null) ? 0 : eventType.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
ActionType other = (ActionType) obj;
if (affectedObjectRefs == null) {
if (other.affectedObjectRefs != null)
return false;
} else if (!affectedObjectRefs.equals(other.affectedObjectRefs))
return false;
if (affectedObjects == null) {
if (other.affectedObjects != null)
return false;
} else if (!affectedObjects.equals(other.affectedObjects))
return false;
if (eventType == null) {
if (other.eventType != null)
return false;
} else if (!eventType.equals(other.eventType))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ActionType \n[id=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \naffectedObjects=");
builder.append(affectedObjects);
builder.append(", \naffectedObjectRefs=");
builder.append(affectedObjectRefs);
builder.append(", \neventType=");
builder.append(eventType);
builder.append("]");
return builder.toString();
}
/**

View file

@ -22,6 +22,7 @@ package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
@ -31,7 +32,6 @@ import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Type;
import org.w3c.dom.Element;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@ -71,6 +71,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -79,6 +82,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "AnyValue")
@XmlRootElement(name = "AnyValue")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AnyValueType", propOrder = { "anyValue" })
@ -87,49 +91,32 @@ public class AnyValueType extends ValueType {
@XmlAnyElement(lax = true)
@DynamicSerializeElement
@Column(name = COLUMN_NAME, columnDefinition = "text")
@Column(columnDefinition = "text")
@Type(type = "com.raytheon.uf.common.registry.schemas.ebxml.util.SerializedType")
protected Object anyValue;
private static final String COLUMN_NAME = "anyValue";
public AnyValueType() {
super();
}
public AnyValueType(Integer id) {
super(id);
}
public AnyValueType(Object anyValue) {
super();
this.anyValue = anyValue;
}
public AnyValueType(Integer id, Object anyValue) {
super(id);
this.anyValue = anyValue;
}
@SuppressWarnings("unchecked")
@Override
public String getColumnName() {
return COLUMN_NAME;
}
/**
* Gets the value of the any property.
*
* @return possible object is {@link Element } {@link Object }
*
*/
public Object getAny() {
return anyValue;
}
/**
* Sets the value of the any property.
*
* @param value
* allowed object is {@link Element } {@link Object }
*
*/
public void setAny(Object value) {
this.anyValue = value;
}
@Override
public Object getValue() {
return getAny();
public <T> T getValue() {
return (T) getAnyValue();
}
public Object getAnyValue() {
@ -141,8 +128,34 @@ public class AnyValueType extends ValueType {
}
@Override
public void setValue(Object value) {
setAny(value);
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((anyValue == null) ? 0 : anyValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
AnyValueType other = (AnyValueType) obj;
if (anyValue == null) {
if (other.anyValue != null)
return false;
} else if (!anyValue.equals(other.anyValue))
return false;
return true;
}
@Override
public String toString() {
return "AnyValueType [anyValue=" + anyValue + ", id=" + id + "]";
}
}

View file

@ -71,6 +71,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable, modified persistence annotations, added hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -85,6 +86,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Association")
public class AssociationType extends RegistryObjectType {
private static final long serialVersionUID = 2987540344551300053L;
@XmlAttribute(required = true)
@DynamicSerializeElement
@Index(name = "assoociation_type_idx")
@ -101,6 +104,19 @@ public class AssociationType extends RegistryObjectType {
@RegistryObjectReference
protected String targetObject;
public AssociationType() {
super();
}
public AssociationType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public AssociationType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the type property.
*
@ -164,4 +180,80 @@ public class AssociationType extends RegistryObjectType {
this.targetObject = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((sourceObject == null) ? 0 : sourceObject.hashCode());
result = prime * result
+ ((targetObject == null) ? 0 : targetObject.hashCode());
result = prime * result + ((type == null) ? 0 : type.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
AssociationType other = (AssociationType) obj;
if (sourceObject == null) {
if (other.sourceObject != null)
return false;
} else if (!sourceObject.equals(other.sourceObject))
return false;
if (targetObject == null) {
if (other.targetObject != null)
return false;
} else if (!targetObject.equals(other.targetObject))
return false;
if (type == null) {
if (other.type != null)
return false;
} else if (!type.equals(other.type))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("AssociationType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \ntype=");
builder.append(type);
builder.append(", \nsourceObject=");
builder.append(sourceObject);
builder.append(", \ntargetObject=");
builder.append(targetObject);
builder.append("]");
return builder.toString();
}
}

View file

@ -79,6 +79,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable, modified persistence annotations, added hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -92,6 +93,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "AuditableEvent")
public class AuditableEventType extends RegistryObjectType {
private static final long serialVersionUID = 3666495291697320807L;
@XmlElement(name = "Action", required = true)
@DynamicSerializeElement
@OneToMany(cascade = CascadeType.ALL)
@ -114,6 +118,22 @@ public class AuditableEventType extends RegistryObjectType {
@DynamicSerializeElement
protected String requestId;
public AuditableEventType() {
super();
}
public AuditableEventType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public AuditableEventType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the action property.
*
@ -211,4 +231,88 @@ public class AuditableEventType extends RegistryObjectType {
this.requestId = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((action == null) ? 0 : action.hashCode());
result = prime * result
+ ((requestId == null) ? 0 : requestId.hashCode());
result = prime * result
+ ((timestamp == null) ? 0 : timestamp.hashCode());
result = prime * result + ((user == null) ? 0 : user.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
AuditableEventType other = (AuditableEventType) obj;
if (action == null) {
if (other.action != null)
return false;
} else if (!action.equals(other.action))
return false;
if (requestId == null) {
if (other.requestId != null)
return false;
} else if (!requestId.equals(other.requestId))
return false;
if (timestamp == null) {
if (other.timestamp != null)
return false;
} else if (!timestamp.equals(other.timestamp))
return false;
if (user == null) {
if (other.user != null)
return false;
} else if (!user.equals(other.user))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("AuditableEventType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \naction=");
builder.append(action);
builder.append(", \ntimestamp=");
builder.append(timestamp);
builder.append(", \nuser=");
builder.append(user);
builder.append(", \nrequestId=");
builder.append(requestId);
builder.append("]");
return builder.toString();
}
}

View file

@ -68,6 +68,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -82,59 +85,73 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "BooleanValue")
public class BooleanValueType extends ValueType {
@Column(name = COLUMN_NAME)
@Column
@XmlElement(name = "Value")
@DynamicSerializeElement
protected Boolean booleanValue;
private static final String COLUMN_NAME = "booleanValue";
public BooleanValueType() {
super();
}
public BooleanValueType(Integer id) {
super(id);
}
public BooleanValueType(Boolean booleanValue) {
super();
this.booleanValue = booleanValue;
}
public BooleanValueType(Integer id, Boolean booleanValue) {
super(id);
this.booleanValue = booleanValue;
}
@SuppressWarnings("unchecked")
@Override
public <T> T getValue() {
return (T) getBooleanValue();
}
public Boolean getBooleanValue() {
return booleanValue;
}
public void setBooleanValue(Boolean booleanValue) {
this.booleanValue = booleanValue;
}
@Override
public String getColumnName() {
return COLUMN_NAME;
}
/**
* Gets the value of the value property.
*
* @return possible object is {@link Boolean }
*
*/
public Boolean isValue() {
return booleanValue;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is {@link Boolean }
*
*/
@Override
public void setValue(Object value) {
this.booleanValue = (Boolean) value;
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((booleanValue == null) ? 0 : booleanValue.hashCode());
return result;
}
@Override
public Boolean getValue() {
return isValue();
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
BooleanValueType other = (BooleanValueType) obj;
if (booleanValue == null) {
if (other.booleanValue != null)
return false;
} else if (!booleanValue.equals(other.booleanValue))
return false;
return true;
}
public Boolean getBooleanValue() {
return isValue();
}
public void setBooleanValue(Boolean booleanValue) {
setValue(booleanValue);
@Override
public String toString() {
return "BooleanValueType [booleanValue=" + booleanValue + ", id=" + id
+ "]";
}
}

View file

@ -69,6 +69,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -83,6 +86,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "ClassificationNode")
public class ClassificationNodeType extends TaxonomyElementType {
private static final long serialVersionUID = 7182901250532204989L;
@XmlAttribute
@DynamicSerializeElement
@RegistryObjectReference
@ -97,6 +102,22 @@ public class ClassificationNodeType extends TaxonomyElementType {
@DynamicSerializeElement
protected String code;
public ClassificationNodeType() {
super();
}
public ClassificationNodeType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public ClassificationNodeType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the parent property.
*
@ -172,38 +193,68 @@ public class ClassificationNodeType extends TaxonomyElementType {
@Override
public boolean equals(Object obj) {
if (this == obj) {
if (this == obj)
return true;
}
if (!super.equals(obj)) {
if (!super.equals(obj))
return false;
}
if (getClass() != obj.getClass()) {
if (getClass() != obj.getClass())
return false;
}
ClassificationNodeType other = (ClassificationNodeType) obj;
if (code == null) {
if (other.code != null) {
if (other.code != null)
return false;
}
} else if (!code.equals(other.code)) {
} else if (!code.equals(other.code))
return false;
}
if (parent == null) {
if (other.parent != null) {
if (other.parent != null)
return false;
}
} else if (!parent.equals(other.parent)) {
} else if (!parent.equals(other.parent))
return false;
}
if (path == null) {
if (other.path != null) {
if (other.path != null)
return false;
}
} else if (!path.equals(other.path)) {
} else if (!path.equals(other.path))
return false;
}
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ClassificationNodeType \n[classificationNode=");
builder.append(classificationNode);
builder.append(", \nname=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nparent=");
builder.append(parent);
builder.append(", \npath=");
builder.append(path);
builder.append(", \ncode=");
builder.append(code);
builder.append("]");
return builder.toString();
}
}

View file

@ -67,6 +67,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -81,6 +84,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "ClassificationScheme")
public class ClassificationSchemeType extends TaxonomyElementType {
private static final long serialVersionUID = -2138843704296663305L;
@XmlAttribute(required = true)
@DynamicSerializeElement
protected boolean isInternal;
@ -90,6 +95,22 @@ public class ClassificationSchemeType extends TaxonomyElementType {
@RegistryObjectReference
protected String nodeType;
public ClassificationSchemeType() {
super();
}
public ClassificationSchemeType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public ClassificationSchemeType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the isInternal property.
*
@ -127,4 +148,70 @@ public class ClassificationSchemeType extends TaxonomyElementType {
this.nodeType = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + (isInternal ? 1231 : 1237);
result = prime * result
+ ((nodeType == null) ? 0 : nodeType.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
ClassificationSchemeType other = (ClassificationSchemeType) obj;
if (isInternal != other.isInternal)
return false;
if (nodeType == null) {
if (other.nodeType != null)
return false;
} else if (!nodeType.equals(other.nodeType))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ClassificationSchemeType \n[classificationNode=");
builder.append(classificationNode);
builder.append(", \nname=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nisInternal=");
builder.append(isInternal);
builder.append(", \nnodeType=");
builder.append(nodeType);
builder.append("]");
return builder.toString();
}
}

View file

@ -70,6 +70,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -84,6 +87,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Classification")
public class ClassificationType extends RegistryObjectType {
private static final long serialVersionUID = -3700650646508958566L;
@XmlAttribute
@DynamicSerializeElement
@RegistryObjectReference
@ -103,6 +108,22 @@ public class ClassificationType extends RegistryObjectType {
@DynamicSerializeElement
protected String nodeRepresentation;
public ClassificationType() {
super();
}
public ClassificationType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public ClassificationType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the classificationScheme property.
*
@ -252,4 +273,43 @@ public class ClassificationType extends RegistryObjectType {
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ClassificationType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nclassificationScheme=");
builder.append(classificationScheme);
builder.append(", \nclassifiedObject=");
builder.append(classifiedObject);
builder.append(", \nclassificationNode=");
builder.append(classificationNode);
builder.append(", \nnodeRepresentation=");
builder.append(nodeRepresentation);
builder.append("]");
return builder.toString();
}
}

View file

@ -24,8 +24,8 @@ import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
@ -77,6 +77,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -93,30 +96,52 @@ public class CollectionValueType extends ValueType {
@XmlElement(name = "Element")
@DynamicSerializeElement
@Column(name = COLUMN_NAME)
@ManyToMany(cascade = CascadeType.ALL)
@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA)
protected List<ValueType> collectionValue;
private List<ValueType> collectionValue;
@XmlAttribute
@DynamicSerializeElement
protected String collectionType;
private static final String COLUMN_NAME = "collectionValue";
private String collectionType;
public CollectionValueType() {
super();
}
public CollectionValueType(Integer id) {
super(id);
}
public CollectionValueType(List<ValueType> collectionValue,
String collectionType) {
super();
this.collectionValue = collectionValue;
this.collectionType = collectionType;
}
public CollectionValueType(Integer id, List<ValueType> collectionValue,
String collectionType) {
super(id);
this.collectionValue = collectionValue;
this.collectionType = collectionType;
}
@SuppressWarnings("unchecked")
@Override
public String getColumnName() {
return COLUMN_NAME;
public <T> T getValue() {
return (T) getCollectionValue();
}
public List<ValueType> getCollectionValue() {
return collectionValue;
}
public void setCollectionValue(List<ValueType> collectionValue) {
this.collectionValue = collectionValue;
}
public void setCollectionType(String collectionType) {
this.collectionType = collectionType;
}
/**
@ -163,34 +188,43 @@ public class CollectionValueType extends ValueType {
}
}
/**
* Sets the value of the collectionType property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setCollectionType(String value) {
this.collectionType = value;
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((collectionType == null) ? 0 : collectionType.hashCode());
result = prime * result
+ ((collectionValue == null) ? 0 : collectionValue.hashCode());
return result;
}
@Override
public List<ValueType> getValue() {
return getElement();
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
CollectionValueType other = (CollectionValueType) obj;
if (collectionType == null) {
if (other.collectionType != null)
return false;
} else if (!collectionType.equals(other.collectionType))
return false;
if (collectionValue == null) {
if (other.collectionValue != null)
return false;
} else if (!collectionValue.equals(other.collectionValue))
return false;
return true;
}
@Override
public void setValue(Object obj) {
this.collectionValue = (List<ValueType>) obj;
}
public List<ValueType> getCollectionValue() {
return collectionValue;
}
public void setCollectionValue(List<ValueType> collectionValue) {
this.collectionValue = collectionValue;
public String toString() {
return "CollectionValueType [collectionValue=" + collectionValue
+ ", collectionType=" + collectionType + ", id=" + id + "]";
}
}

View file

@ -20,11 +20,17 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
@ -62,6 +68,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -71,6 +80,30 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CommentType")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Comment")
public class CommentType extends ExtrinsicObjectType {
/**
*
*/
private static final long serialVersionUID = -4722110982253223712L;
public CommentType() {
super();
}
public CommentType(String id, String lid, String objectType, String owner,
String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public CommentType(String id, String lid) {
super(id, lid);
}
}

View file

@ -76,6 +76,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 10/23/2013 1538 bphillip Added setTime method
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -90,42 +93,39 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "DateTimeValue")
public class DateTimeValueType extends ValueType {
@Column(name = "DateTimeValue")
@Column
@Type(type = "com.raytheon.uf.common.registry.schemas.ebxml.util.XMLGregorianCalendarType")
@XmlElement(name = "Value")
@XmlSchemaType(name = "dateTime")
@DynamicSerializeElement
protected XMLGregorianCalendar dateTimeValue;
private static final String COLUMN_NAME = "dateTimeValue";
public DateTimeValueType() {
super();
}
public DateTimeValueType(Integer id) {
super(id);
}
public DateTimeValueType(XMLGregorianCalendar dateTimeValue) {
super();
this.dateTimeValue = dateTimeValue;
}
public DateTimeValueType(long time) {
public DateTimeValueType(Integer id, XMLGregorianCalendar dateTimeValue) {
super(id);
this.dateTimeValue = dateTimeValue;
}
public DateTimeValueType(Long time) {
setTime(time);
}
@Override
public String getColumnName() {
return COLUMN_NAME;
}
/**
* Gets the value of the value property.
*
* @return possible object is {@link XMLGregorianCalendar }
*
*/
@SuppressWarnings("unchecked")
@Override
public XMLGregorianCalendar getValue() {
return dateTimeValue;
public <T> T getValue() {
return (T) getDateTimeValue();
}
public void setTime(long time) {
@ -140,24 +140,44 @@ public class DateTimeValueType extends ValueType {
}
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is {@link XMLGregorianCalendar }
*
*/
@Override
public void setValue(Object value) {
this.dateTimeValue = (XMLGregorianCalendar) value;
}
public XMLGregorianCalendar getDateTimeValue() {
return getValue();
return dateTimeValue;
}
public void setDateTimeValue(XMLGregorianCalendar dateTimeValue) {
setValue(dateTimeValue);
this.dateTimeValue = dateTimeValue;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((dateTimeValue == null) ? 0 : dateTimeValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
DateTimeValueType other = (DateTimeValueType) obj;
if (dateTimeValue == null) {
if (other.dateTimeValue != null)
return false;
} else if (!dateTimeValue.equals(other.dateTimeValue))
return false;
return true;
}
@Override
public String toString() {
return "DateTimeValueType [dateTimeValue=" + dateTimeValue + ", id="
+ id + "]";
}
}

View file

@ -22,16 +22,12 @@ package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
@ -79,6 +75,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable, modified persistence annotations, added hashCode and equals
* </pre>
*
* @author bphillip
@ -93,12 +90,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "DeliveryInfo")
public class DeliveryInfoType extends ExtensibleObjectType {
@Id
@SequenceGenerator(name = "DeliveryInfoTypeGenerator", schema = RegrepUtil.EBXML_SCHEMA, sequenceName = RegrepUtil.EBXML_SCHEMA
+ ".DeliveryInfo_sequence")
@GeneratedValue(generator = "DeliveryInfoTypeGenerator")
@XmlTransient
private Integer key;
private static final long serialVersionUID = -5102364923190271786L;
// TODO: Revisit how to handle serialization of this field
// @DynamicSerializeElement
@ -112,9 +104,8 @@ public class DeliveryInfoType extends ExtensibleObjectType {
@RegistryObjectReference
protected String notificationOption;
public Integer getKey() {
return key;
public DeliveryInfoType() {
super();
}
/**
@ -163,15 +154,10 @@ public class DeliveryInfoType extends ExtensibleObjectType {
this.notificationOption = value;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
int result = super.hashCode();
result = prime
* result
+ ((notificationOption == null) ? 0 : notificationOption
@ -181,38 +167,41 @@ public class DeliveryInfoType extends ExtensibleObjectType {
return result;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
if (this == obj)
return true;
}
if (obj == null) {
if (!super.equals(obj))
return false;
}
if (getClass() != obj.getClass()) {
if (getClass() != obj.getClass())
return false;
}
DeliveryInfoType other = (DeliveryInfoType) obj;
if (notificationOption == null) {
if (other.notificationOption != null) {
if (other.notificationOption != null)
return false;
}
} else if (!notificationOption.equals(other.notificationOption)) {
} else if (!notificationOption.equals(other.notificationOption))
return false;
}
if (notifyTo == null) {
if (other.notifyTo != null) {
if (other.notifyTo != null)
return false;
}
} else if (!notifyTo.equals(other.notifyTo)) {
} else if (!notifyTo.equals(other.notifyTo))
return false;
}
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("DeliveryInfoType \n[id=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nnotifyTo=");
builder.append(notifyTo);
builder.append(", \nnotificationOption=");
builder.append(notificationOption);
builder.append("]");
return builder.toString();
}
}

View file

@ -70,6 +70,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -87,53 +90,71 @@ public class DurationValueType extends ValueType {
@XmlElement(name = "Value")
@DynamicSerializeElement
@Type(type = "com.raytheon.uf.common.registry.schemas.ebxml.util.DurationType")
@Column(name = COLUMN_NAME)
@Column
protected Duration durationValue;
private static final String COLUMN_NAME = "durationValue";
public DurationValueType() {
super();
}
public DurationValueType(Integer id) {
super(id);
}
public DurationValueType(Duration durationValue) {
super();
this.durationValue = durationValue;
}
public DurationValueType(Integer id, Duration durationValue) {
super(id);
this.durationValue = durationValue;
}
@SuppressWarnings("unchecked")
@Override
public <T> T getValue() {
return (T) getDurationValue();
}
public Duration getDurationValue() {
return durationValue;
}
public void setDurationValue(Duration durationValue) {
this.durationValue = durationValue;
}
@Override
public String getColumnName() {
return COLUMN_NAME;
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((durationValue == null) ? 0 : durationValue.hashCode());
return result;
}
/**
* Gets the value of the value property.
*
* @return possible object is {@link Duration }
*
*/
@Override
public Duration getValue() {
return durationValue;
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
DurationValueType other = (DurationValueType) obj;
if (durationValue == null) {
if (other.durationValue != null)
return false;
} else if (!durationValue.equals(other.durationValue))
return false;
return true;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is {@link Duration }
*
*/
@Override
public void setValue(Object value) {
this.durationValue = (Duration) value;
}
public Duration getDurationValue() {
return getValue();
}
public void setDurationValue(Duration durationValue) {
setValue(durationValue);
public String toString() {
return "DurationValueType [durationValue=" + durationValue + ", id="
+ id + "]";
}
}

View file

@ -20,6 +20,7 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.Table;
@ -31,8 +32,6 @@ import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@ -71,6 +70,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -85,16 +86,53 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "DynamicObjectRef")
public class DynamicObjectRefType extends ObjectRefType {
private static final long serialVersionUID = -1684456338817445194L;
@XmlElement(name = "Query", required = true)
@DynamicSerializeElement
@OneToOne
@Cascade(value = { CascadeType.SAVE_UPDATE })
@OneToOne(cascade = CascadeType.ALL)
protected QueryType query;
public DynamicObjectRefType() {
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((query == null) ? 0 : query.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
DynamicObjectRefType other = (DynamicObjectRefType) obj;
if (query == null) {
if (other.query != null)
return false;
} else if (!query.equals(other.query))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("DynamicObjectRefType \n[id=");
builder.append(id);
builder.append(", \nquery=");
builder.append(query);
builder.append("]");
return builder.toString();
}
/**
* Gets the value of the query property.
*

View file

@ -20,18 +20,12 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
@ -71,6 +65,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable, modified persistence annotations, added hashCode and equals
* </pre>
*
* @author bphillip
@ -83,17 +78,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "EmailAddress")
public class EmailAddressType extends ExtensibleObjectType implements
Serializable {
public class EmailAddressType extends ExtensibleObjectType {
private static final long serialVersionUID = -2958054699149020163L;
@Id
@SequenceGenerator(name = "EmailAddressTypeGenerator", schema = RegrepUtil.EBXML_SCHEMA, sequenceName = RegrepUtil.EBXML_SCHEMA
+ ".EmailAddress_sequence")
@GeneratedValue(generator = "EmailAddressTypeGenerator")
@XmlTransient
private Integer key;
@XmlAttribute(required = true)
@DynamicSerializeElement
protected String address;
@ -103,8 +90,8 @@ public class EmailAddressType extends ExtensibleObjectType implements
@RegistryObjectReference
protected String type;
public Integer getKey() {
return key;
public EmailAddressType() {
super();
}
/**
@ -197,4 +184,19 @@ public class EmailAddressType extends ExtensibleObjectType implements
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("EmailAddressType \n[id=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \naddress=");
builder.append(address);
builder.append(", \ntype=");
builder.append(type);
builder.append("]");
return builder.toString();
}
}

View file

@ -25,6 +25,7 @@ import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
@ -74,6 +75,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -94,12 +97,14 @@ public class EntryType implements Serializable {
@XmlElement(name = "EntryKey", required = true)
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "entryKey_id", nullable = false, referencedColumnName = "id")
protected ValueType entryKey;
@Id
@XmlElement(name = "EntryValue")
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "entryValue_id", nullable = false, referencedColumnName = "id")
protected ValueType entryValue;
/**
@ -144,4 +149,43 @@ public class EntryType implements Serializable {
this.entryValue = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((entryKey == null) ? 0 : entryKey.hashCode());
result = prime * result
+ ((entryValue == null) ? 0 : entryValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
EntryType other = (EntryType) obj;
if (entryKey == null) {
if (other.entryKey != null)
return false;
} else if (!entryKey.equals(other.entryKey))
return false;
if (entryValue == null) {
if (other.entryValue != null)
return false;
} else if (!entryValue.equals(other.entryValue))
return false;
return true;
}
@Override
public String toString() {
return "EntryType [entryKey=" + entryKey + ", entryValue=" + entryValue
+ "]";
}
}

View file

@ -20,41 +20,43 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import oasis.names.tc.ebxml.regrep.xsd.rs.v4.RegistryExceptionType;
import oasis.names.tc.ebxml.regrep.xsd.rs.v4.RegistryRequestType;
import oasis.names.tc.ebxml.regrep.xsd.rs.v4.RegistryResponseType;
import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.dataplugin.persist.IPersistableDataObject;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
/**
*
@ -88,6 +90,7 @@ import com.raytheon.uf.common.status.UFStatus;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable, modified persistence annotations, added hashCode and equals
* </pre>
*
* @author bphillip
@ -103,83 +106,40 @@ import com.raytheon.uf.common.status.UFStatus;
QueryExpressionType.class, RegistryExceptionType.class,
RegistryResponseType.class, RegistryRequestType.class })
@DynamicSerialize
@MappedSuperclass
@Entity
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "ExtensibleObject")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL, include = "all")
public abstract class ExtensibleObjectType {
public abstract class ExtensibleObjectType implements Serializable,
IPersistableDataObject<String> {
private static final IUFStatusHandler statusHandler = UFStatus
.getHandler(ExtensibleObjectType.class);
private static final long serialVersionUID = 785780260533569469L;
@BatchSize(size = 500)
@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA, inverseJoinColumns = @JoinColumn(name = "child_slot_key"))
@Id
@Column(length = 1024)
@DynamicSerializeElement
@XmlTransient
protected String id;
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "parent_id", nullable = false, referencedColumnName = "id")
@XmlElement(name = "Slot")
@DynamicSerializeElement
protected Set<SlotType> slot;
private static final Map<Class<?>, Class<?>> SLOT_VALUE_TYPE_MAP;
static {
Map<Class<?>, Class<?>> map = new HashMap<Class<?>, Class<?>>();
map.put(String.class, StringValueType.class);
map.put(Integer.class, IntegerValueType.class);
map.put(Float.class, FloatValueType.class);
SLOT_VALUE_TYPE_MAP = Collections.unmodifiableMap(map);
protected List<SlotType> slot;
public ExtensibleObjectType() {
super();
this.id = UUID.randomUUID().toString();
}
protected ExtensibleObjectType() {
public ExtensibleObjectType(String id) {
this.id = id;
}
protected ExtensibleObjectType(Collection<SlotType> slots) {
if (slots != null) {
getSlot().addAll(slots);
}
}
protected ExtensibleObjectType(Object... slotNameValues) {
if (slotNameValues.length % 2 != 0) {
throw new IllegalArgumentException(
"Incorrect number of arguments submitted to ExtensibleObjectType constructor");
}
for (int i = 0; i < slotNameValues.length; i += 2) {
addSlot((String) slotNameValues[i], slotNameValues[i + 1]);
}
}
public SlotType createSlot(String slotName, Object slotValue) {
SlotType slot = new SlotType();
slot.setName(slotName);
Class<?> slotValueTypeClass = SLOT_VALUE_TYPE_MAP.get(slotValue
.getClass());
ValueType slotValueObject = null;
if (slotValueTypeClass != null) {
try {
slotValueObject = (ValueType) slotValueTypeClass.newInstance();
} catch (Exception e) {
statusHandler.error("Error instantiating slot value!", e);
}
} else {
throw new IllegalArgumentException(
"Unable to create slot for type: " + slotValue.getClass());
}
slotValueObject.setValue(slotValue);
slot.setSlotValue(slotValueObject);
return slot;
}
public void addSlot(String slotName, Object slotValue) {
getSlot().add(createSlot(slotName, slotValue));
}
public void updateSlot(String slotName, Object slotValue) {
SlotType slot = getSlotByName(slotName);
if (slot == null) {
addSlot(slotName, slotValue);
} else {
slot.getSlotValue().setValue(slotValue);
}
public ExtensibleObjectType(String id, List<SlotType> slot) {
super();
this.id = id;
this.slot = slot;
}
public SlotType getSlotByName(String slotName) {
@ -213,14 +173,14 @@ public abstract class ExtensibleObjectType {
*
*
*/
public Set<SlotType> getSlot() {
public List<SlotType> getSlot() {
if (slot == null) {
slot = new HashSet<SlotType>();
slot = new ArrayList<SlotType>();
}
return this.slot;
}
public void setSlot(Set<SlotType> slot) {
public void setSlot(List<SlotType> slot) {
this.slot = slot;
}
@ -298,4 +258,28 @@ public abstract class ExtensibleObjectType {
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ExtensibleObjectType \n[id=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append("]");
return builder.toString();
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Override
public String getIdentifier() {
return id;
}
}

View file

@ -69,6 +69,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -83,6 +86,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "ExternalIdentifier")
public class ExternalIdentifierType extends RegistryObjectType {
private static final long serialVersionUID = -5707238169872535416L;
@XmlAttribute
@DynamicSerializeElement
@RegistryObjectReference
@ -97,6 +102,22 @@ public class ExternalIdentifierType extends RegistryObjectType {
@DynamicSerializeElement
protected String value;
public ExternalIdentifierType() {
super();
}
public ExternalIdentifierType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public ExternalIdentifierType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the registryObject property.
*
@ -160,4 +181,82 @@ public class ExternalIdentifierType extends RegistryObjectType {
this.value = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime
* result
+ ((identificationScheme == null) ? 0 : identificationScheme
.hashCode());
result = prime * result
+ ((registryObject == null) ? 0 : registryObject.hashCode());
result = prime * result + ((value == null) ? 0 : value.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
ExternalIdentifierType other = (ExternalIdentifierType) obj;
if (identificationScheme == null) {
if (other.identificationScheme != null)
return false;
} else if (!identificationScheme.equals(other.identificationScheme))
return false;
if (registryObject == null) {
if (other.registryObject != null)
return false;
} else if (!registryObject.equals(other.registryObject))
return false;
if (value == null) {
if (other.value != null)
return false;
} else if (!value.equals(other.value))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ExternalIdentifierType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nregistryObject=");
builder.append(registryObject);
builder.append(", \nidentificationScheme=");
builder.append(identificationScheme);
builder.append(", \nvalue=");
builder.append(value);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,9 +20,8 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.CascadeType;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -72,6 +71,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -86,9 +88,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "ExternalLink")
public class ExternalLinkType extends RegistryObjectType {
private static final long serialVersionUID = 8038203182028339980L;
@XmlElement(name = "ExternalRef", required = true)
@DynamicSerializeElement
@ManyToOne(cascade = CascadeType.ALL)
@Embedded
protected SimpleLinkType externalRef;
@XmlAttribute
@ -96,6 +100,22 @@ public class ExternalLinkType extends RegistryObjectType {
@RegistryObjectReference
protected String registryObject;
public ExternalLinkType() {
super();
}
public ExternalLinkType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public ExternalLinkType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the externalRef property.
*
@ -138,4 +158,72 @@ public class ExternalLinkType extends RegistryObjectType {
this.registryObject = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((externalRef == null) ? 0 : externalRef.hashCode());
result = prime * result
+ ((registryObject == null) ? 0 : registryObject.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
ExternalLinkType other = (ExternalLinkType) obj;
if (externalRef == null) {
if (other.externalRef != null)
return false;
} else if (!externalRef.equals(other.externalRef))
return false;
if (registryObject == null) {
if (other.registryObject != null)
return false;
} else if (!registryObject.equals(other.registryObject))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ExternalLinkType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nexternalRef=");
builder.append(externalRef);
builder.append(", \nregistryObject=");
builder.append(registryObject);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,14 +20,14 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import java.util.Arrays;
import javax.activation.DataHandler;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -84,6 +84,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -100,6 +103,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "ExtrinsicObject")
public class ExtrinsicObjectType extends RegistryObjectType {
private static final long serialVersionUID = -2572225450725363471L;
@XmlElement(name = "ContentVersionInfo")
@DynamicSerializeElement
@AttributeOverrides({
@ -110,7 +115,7 @@ public class ExtrinsicObjectType extends RegistryObjectType {
@XmlElement(name = "RepositoryItemRef")
@DynamicSerializeElement
@ManyToOne(cascade = CascadeType.ALL)
@Embedded
protected SimpleLinkType repositoryItemRef;
@XmlElement(name = "RepositoryItem")
@ -129,12 +134,19 @@ public class ExtrinsicObjectType extends RegistryObjectType {
protected String mimeType;
public ExtrinsicObjectType() {
super();
}
public ExtrinsicObjectType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public ExtrinsicObjectType(String id, String lid) {
super(id, lid);
}
/**
@ -221,4 +233,90 @@ public class ExtrinsicObjectType extends RegistryObjectType {
this.mimeType = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime
* result
+ ((contentVersionInfo == null) ? 0 : contentVersionInfo
.hashCode());
result = prime * result
+ ((mimeType == null) ? 0 : mimeType.hashCode());
result = prime * result + Arrays.hashCode(repositoryItem);
result = prime
* result
+ ((repositoryItemRef == null) ? 0 : repositoryItemRef
.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
ExtrinsicObjectType other = (ExtrinsicObjectType) obj;
if (contentVersionInfo == null) {
if (other.contentVersionInfo != null)
return false;
} else if (!contentVersionInfo.equals(other.contentVersionInfo))
return false;
if (mimeType == null) {
if (other.mimeType != null)
return false;
} else if (!mimeType.equals(other.mimeType))
return false;
if (!Arrays.equals(repositoryItem, other.repositoryItem))
return false;
if (repositoryItemRef == null) {
if (other.repositoryItemRef != null)
return false;
} else if (!repositoryItemRef.equals(other.repositoryItemRef))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ExtrinsicObjectType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \ncontentVersionInfo=");
builder.append(contentVersionInfo);
builder.append(", \nrepositoryItemRef=");
builder.append(repositoryItemRef);
builder.append(", \nrepositoryItem=");
builder.append(Arrays.toString(repositoryItem));
builder.append(", \nmimeType=");
builder.append(mimeType);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,9 +20,9 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@ -32,6 +32,7 @@ import javax.xml.datatype.Duration;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Type;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@ -65,6 +66,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -79,11 +83,30 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Federation")
public class FederationType extends RegistryObjectType {
@Transient
private static final long serialVersionUID = -4959078412195417892L;
@Column
@Type(type = "com.raytheon.uf.common.registry.schemas.ebxml.util.DurationType")
@XmlAttribute
@DynamicSerializeElement
protected Duration replicationSyncLatency;
public FederationType() {
super();
}
public FederationType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public FederationType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the replicationSyncLatency property.
*
@ -105,4 +128,65 @@ public class FederationType extends RegistryObjectType {
this.replicationSyncLatency = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime
* result
+ ((replicationSyncLatency == null) ? 0
: replicationSyncLatency.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
FederationType other = (FederationType) obj;
if (replicationSyncLatency == null) {
if (other.replicationSyncLatency != null)
return false;
} else if (!replicationSyncLatency.equals(other.replicationSyncLatency))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("FederationType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nreplicationSyncLatency=");
builder.append(replicationSyncLatency);
builder.append("]");
return builder.toString();
}
}

View file

@ -68,6 +68,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -81,55 +84,73 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "FloatValue")
public class FloatValueType extends ValueType {
@Column(name = COLUMN_NAME)
@Column
@XmlElement(name = "Value")
@DynamicSerializeElement
protected Float floatValue;
private static final String COLUMN_NAME = "floatValue";
public FloatValueType() {
super();
}
public FloatValueType(Integer id) {
super(id);
}
public FloatValueType(Float floatValue) {
super();
this.floatValue = floatValue;
}
public FloatValueType(Integer id, Float floatValue) {
super(id);
this.floatValue = floatValue;
}
@SuppressWarnings("unchecked")
@Override
public <T> T getValue() {
return (T) getFloatValue();
}
public Float getFloatValue() {
return floatValue;
}
public void setFloatValue(Float floatValue) {
this.floatValue = floatValue;
}
@Override
public String getColumnName() {
return COLUMN_NAME;
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((floatValue == null) ? 0 : floatValue.hashCode());
return result;
}
/**
* Gets the value of the value property.
*
* @return possible object is {@link Float }
*
*/
@Override
public Float getValue() {
return floatValue;
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
FloatValueType other = (FloatValueType) obj;
if (floatValue == null) {
if (other.floatValue != null)
return false;
} else if (!floatValue.equals(other.floatValue))
return false;
return true;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is {@link Float }
*
*/
@Override
public void setValue(Object value) {
this.floatValue = (Float) value;
}
public Float getFloatValue() {
return getValue();
}
public void setFloatValue(Float floatValue) {
setValue(floatValue);
public String toString() {
return "FloatValueType [floatValue=" + floatValue + ", id=" + id + "]";
}
}

View file

@ -20,10 +20,12 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import java.util.Collection;
import java.util.List;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@ -37,7 +39,6 @@ import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.dataplugin.persist.IPersistableDataObject;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
/**
*
@ -70,6 +71,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable, modified persistence annotations, added hashCode and equals
* </pre>
*
* @author bphillip
@ -80,23 +82,21 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlType(name = "IdentifiableType")
@XmlSeeAlso({ RegistryObjectType.class })
@DynamicSerialize
@MappedSuperclass
@Entity
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Identifiable")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL, include = "all")
public abstract class IdentifiableType extends ExtensibleObjectType implements
IPersistableDataObject<String> {
@Id
@XmlAttribute(required = true)
@DynamicSerializeElement
protected String id;
private static final long serialVersionUID = -4589394594867000988L;
protected IdentifiableType() {
super();
}
protected IdentifiableType(Collection<SlotType> slots, String id) {
super(slots);
this.id = id;
protected IdentifiableType(List<SlotType> slots, String id) {
super(id, slots);
}
/**
@ -105,48 +105,14 @@ public abstract class IdentifiableType extends ExtensibleObjectType implements
* @return possible object is {@link String }
*
*/
@XmlAttribute(required = true)
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
public String getIdentifier() {
return id;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
IdentifiableType other = (IdentifiableType) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
public void setId(String id) {
super.setId(id);
}
}

View file

@ -70,6 +70,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -83,21 +86,16 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "IntegerValue")
public class IntegerValueType extends ValueType {
@Column(name = COLUMN_NAME)
@Column
@XmlElement(name = "Value")
@DynamicSerializeElement
protected BigInteger integerValue;
private static final String COLUMN_NAME = "integerValue";
public IntegerValueType() {
}
public IntegerValueType(BigInteger integerValue) {
this.integerValue = integerValue;
}
public IntegerValueType(Integer integerValue) {
this.integerValue = BigInteger.valueOf(integerValue.longValue());
}
@ -106,49 +104,60 @@ public class IntegerValueType extends ValueType {
this.integerValue = BigInteger.valueOf(integerValue);
}
@Override
public String getColumnName() {
return COLUMN_NAME;
public IntegerValueType(BigInteger integerValue) {
super();
this.integerValue = integerValue;
}
/**
* Gets the value of the value property.
*
* @return possible object is {@link BigInteger }
*
*/
@Override
public BigInteger getValue() {
return integerValue;
public IntegerValueType(Integer id, BigInteger integerValue) {
super(id);
this.integerValue = integerValue;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
@SuppressWarnings("unchecked")
@Override
public void setValue(Object value) {
if (value instanceof Integer) {
this.integerValue = BigInteger.valueOf(((Integer) value)
.longValue());
} else if (value instanceof BigInteger) {
this.integerValue = (BigInteger) value;
} else {
throw new IllegalArgumentException(
"IntegerValueType cannot have values of type: "
+ value.getClass());
}
public <T> T getValue() {
return (T) getIntegerValue();
}
public BigInteger getIntegerValue() {
return getValue();
return integerValue;
}
public void setIntegerValue(BigInteger integerValue) {
setValue(integerValue);
this.integerValue = integerValue;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((integerValue == null) ? 0 : integerValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
IntegerValueType other = (IntegerValueType) obj;
if (integerValue == null) {
if (other.integerValue != null)
return false;
} else if (!integerValue.equals(other.integerValue))
return false;
return true;
}
@Override
public String toString() {
return "IntegerValueType [integerValue=" + integerValue + ", id=" + id
+ "]";
}
}

View file

@ -29,7 +29,7 @@ import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinTable;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@ -103,12 +103,12 @@ public class InternationalStringType implements Serializable {
+ ".InternationalString_sequence")
@GeneratedValue(generator = "InternationalStringTypeGenerator")
@XmlTransient
private Integer key;
private Integer id;
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "string_id", nullable = false, referencedColumnName = "id")
@XmlElement(name = "LocalizedString")
@DynamicSerializeElement
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA)
protected List<LocalizedStringType> localizedString;
public InternationalStringType() {
@ -199,12 +199,18 @@ public class InternationalStringType implements Serializable {
return true;
}
public Integer getKey() {
return key;
@Override
public String toString() {
return "InternationalStringType [id=" + id + ", localizedString="
+ localizedString + "]";
}
public void setKey(Integer key) {
this.key = key;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
}

View file

@ -22,6 +22,7 @@ package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
@ -70,6 +71,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -87,54 +91,33 @@ public class InternationalStringValueType extends ValueType {
@XmlElement(name = "Value")
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "internationalstring_id", referencedColumnName = "id")
protected InternationalStringType internationalStringValue;
private static final String COLUMN_NAME = "internationalStringValue";
public InternationalStringValueType() {
super();
}
public InternationalStringValueType(Integer id) {
super(id);
}
public InternationalStringValueType(
InternationalStringType internationalStringValue) {
super();
this.internationalStringValue = internationalStringValue;
}
public InternationalStringValueType(String internationalStringValue) {
this.internationalStringValue = new InternationalStringType(
internationalStringValue);
public InternationalStringValueType(Integer id,
InternationalStringType internationalStringValue) {
super(id);
this.internationalStringValue = internationalStringValue;
}
public InternationalStringValueType(String lang,
String internationalStringValue) {
this.internationalStringValue = new InternationalStringType(lang,
internationalStringValue);
}
@Override
public String getColumnName() {
return COLUMN_NAME;
}
/**
* Gets the value of the value property.
*
* @return possible object is {@link InternationalStringType }
*
*/
@Override
@SuppressWarnings("unchecked")
public InternationalStringType getValue() {
return internationalStringValue;
}
public void setValue(InternationalStringType obj) {
this.internationalStringValue = obj;
}
@Override
public void setValue(Object obj) {
this.internationalStringValue = (InternationalStringType) obj;
public <T> T getValue() {
return (T) getInternationalStringValue();
}
public InternationalStringType getInternationalStringValue() {
@ -146,4 +129,39 @@ public class InternationalStringValueType extends ValueType {
this.internationalStringValue = internationalStringValue;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime
* result
+ ((internationalStringValue == null) ? 0
: internationalStringValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
InternationalStringValueType other = (InternationalStringValueType) obj;
if (internationalStringValue == null) {
if (other.internationalStringValue != null)
return false;
} else if (!internationalStringValue
.equals(other.internationalStringValue))
return false;
return true;
}
@Override
public String toString() {
return "InternationalStringValueType [internationalStringValue="
+ internationalStringValue + ", id=" + id + "]";
}
}

View file

@ -35,6 +35,7 @@ import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@ -73,6 +74,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -85,6 +88,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "LocalizedString")
@org.hibernate.annotations.Table(appliesTo = "LocalizedString", indexes = { @Index(name = "localizedString_idx", columnNames = { "string_id" }) })
public class LocalizedStringType {
@Id
@ -92,7 +96,7 @@ public class LocalizedStringType {
+ ".LocalizedString_sequence")
@GeneratedValue(generator = "LocalizedStringTypeGenerator")
@XmlTransient
private Integer key;
private Integer id;
@XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace")
@DynamicSerializeElement
@ -116,8 +120,12 @@ public class LocalizedStringType {
this.value = value;
}
public Integer getKey() {
return key;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
/**
@ -214,4 +222,10 @@ public class LocalizedStringType {
return true;
}
@Override
public String toString() {
return "LocalizedStringType [id=" + id + ", lang=" + lang + ", value="
+ value + "]";
}
}

View file

@ -26,10 +26,11 @@ import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
@ -79,6 +80,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -100,16 +103,12 @@ public class MapType implements Serializable {
+ ".Map_sequence")
@GeneratedValue(generator = "MapTypeGenerator")
@XmlTransient
protected Integer key;
public Integer getKey() {
return key;
}
protected Integer id;
@XmlElement(name = "Entry")
@DynamicSerializeElement
@ManyToMany(cascade = CascadeType.ALL)
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA)
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "parent_id", nullable = false, referencedColumnName = "id")
protected List<EntryType> entry;
public MapType() {
@ -154,6 +153,14 @@ public class MapType implements Serializable {
this.entry = entry;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Override
public int hashCode() {
final int prime = 31;
@ -184,4 +191,9 @@ public class MapType implements Serializable {
return true;
}
@Override
public String toString() {
return "MapType [id=" + id + ", entry=" + entry + "]";
}
}

View file

@ -20,8 +20,11 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Column;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -30,7 +33,6 @@ import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Type;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@ -68,6 +70,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -75,6 +80,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@Entity(name = "MapValue")
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "MapValue")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MapValueType", propOrder = { "mapValue" })
@ -83,61 +89,71 @@ public class MapValueType extends ValueType {
@XmlElement(name = "Map")
@DynamicSerializeElement
@Column(name = COLUMN_NAME, columnDefinition = "text")
@Type(type = "com.raytheon.uf.common.registry.schemas.ebxml.util.SerializedType")
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "value_id", referencedColumnName = "id")
protected MapType mapValue;
private static final String COLUMN_NAME = "mapValue";
public MapValueType() {
super();
}
public MapValueType(Integer id) {
super(id);
}
public MapValueType(MapType mapValue) {
super();
this.mapValue = mapValue;
}
public MapValueType(Integer id, MapType mapValue) {
super(id);
this.mapValue = mapValue;
}
@SuppressWarnings("unchecked")
@Override
public <T> T getValue() {
return (T) getMapValue();
}
public MapType getMapValue() {
return mapValue;
}
public void setMapValue(MapType mapValue) {
this.mapValue = mapValue;
}
@Override
public String getColumnName() {
return COLUMN_NAME;
}
/**
* Gets the value of the map property.
*
* @return possible object is {@link MapType }
*
*/
public MapType getMap() {
return mapValue;
}
/**
* Sets the value of the map property.
*
* @param value
* allowed object is {@link MapType }
*
*/
public void setMap(MapType value) {
this.mapValue = value;
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((mapValue == null) ? 0 : mapValue.hashCode());
return result;
}
@Override
public MapType getValue() {
return getMap();
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
MapValueType other = (MapValueType) obj;
if (mapValue == null) {
if (other.mapValue != null)
return false;
} else if (!mapValue.equals(other.mapValue))
return false;
return true;
}
@Override
public void setValue(Object obj) {
this.mapValue = (MapType) obj;
public String toString() {
return "MapValueType [mapValue=" + mapValue + ", id=" + id + "]";
}
public MapType getMapValue() {
return getValue();
}
public void setMapValue(MapType mapValue) {
setValue(mapValue);
}
}

View file

@ -25,7 +25,7 @@ import java.util.List;
import javax.persistence.Entity;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -74,6 +74,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -88,9 +91,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Notification")
public class NotificationType extends RegistryObjectType {
private static final long serialVersionUID = -5404370602389921642L;
@XmlElement(name = "Event", required = true)
@DynamicSerializeElement
@ManyToMany
@OneToMany
@Cascade({})
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA)
protected List<AuditableEventType> event;
@ -100,6 +105,22 @@ public class NotificationType extends RegistryObjectType {
@RegistryObjectReference
protected String subscription;
public NotificationType() {
super();
}
public NotificationType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public NotificationType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the event property.
*
@ -155,4 +176,71 @@ public class NotificationType extends RegistryObjectType {
this.subscription = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((event == null) ? 0 : event.hashCode());
result = prime * result
+ ((subscription == null) ? 0 : subscription.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
NotificationType other = (NotificationType) obj;
if (event == null) {
if (other.event != null)
return false;
} else if (!event.equals(other.event))
return false;
if (subscription == null) {
if (other.subscription != null)
return false;
} else if (!subscription.equals(other.subscription))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("NotificationType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nevent=");
builder.append(event);
builder.append(", \nsubscription=");
builder.append(subscription);
builder.append("]");
return builder.toString();
}
}

View file

@ -23,11 +23,12 @@ package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
@ -39,8 +40,6 @@ import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@ -79,6 +78,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 10/23/2013 1538 bphillip Changed Hibernate cascade type on objectRef field
* 12/2/2013 1829 bphillip Modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -94,21 +95,24 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
public class ObjectRefListType {
@Id
@SequenceGenerator(name = "ObjectRefListTypeGenerator", schema = RegrepUtil.EBXML_SCHEMA, sequenceName = RegrepUtil.EBXML_SCHEMA
@SequenceGenerator(name = "ObjectRefListGenerator", schema = RegrepUtil.EBXML_SCHEMA, sequenceName = RegrepUtil.EBXML_SCHEMA
+ ".ObjectRefList_sequence")
@GeneratedValue(generator = "ObjectRefListTypeGenerator")
@GeneratedValue(generator = "ObjectRefListGenerator")
@XmlTransient
private Integer key;
private int id;
@XmlElement(name = "ObjectRef")
@DynamicSerializeElement
@ManyToMany
@Cascade({ CascadeType.ALL })
@OneToMany(cascade = CascadeType.ALL)
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA)
protected List<ObjectRefType> objectRef;
public Integer getKey() {
return key;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
/**
@ -186,4 +190,15 @@ public class ObjectRefListType {
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ObjectRefListType \n[id=");
builder.append(id);
builder.append(", \nobjectRef=");
builder.append(objectRef);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,12 +20,12 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import java.util.UUID;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -74,7 +74,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 10/23/2013 1538 bphillip Added sequence generator and unique key so refs will not be shared
* amond multiple ref lists
* among multiple ref lists
* 12/2/2013 1829 bphillip Modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -89,26 +91,23 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "ObjectRef")
public class ObjectRefType extends ExtensibleObjectType implements
IPersistableDataObject<String> {
public class ObjectRefType implements IPersistableDataObject<String> {
@Id
@SequenceGenerator(name = "ObjectRefTypeGenerator", schema = RegrepUtil.EBXML_SCHEMA, sequenceName = RegrepUtil.EBXML_SCHEMA
+ ".ObjectRef_sequence")
@GeneratedValue(generator = "ObjectRefTypeGenerator")
@XmlTransient
private Integer key;
private String key;
@XmlAttribute(required = true)
@DynamicSerializeElement
protected String id;
public ObjectRefType() {
this.key = UUID.randomUUID().toString();
}
public ObjectRefType(String id) {
this.id = id;
this.key = UUID.randomUUID().toString();
}
/**
@ -137,12 +136,23 @@ public class ObjectRefType extends ExtensibleObjectType implements
return getId();
}
public Integer getKey() {
public String getKey() {
return key;
}
public void setKey(Integer key) {
public void setKey(String key) {
this.key = key;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ObjectRefType \n[key=");
builder.append(key);
builder.append(", \nid=");
builder.append(id);
builder.append("]");
return builder.toString();
}
}

View file

@ -27,7 +27,7 @@ import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -75,6 +75,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -89,9 +92,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Organization")
public class OrganizationType extends PartyType {
private static final long serialVersionUID = -8173042371419582372L;
@XmlElement(name = "Organization")
@DynamicSerializeElement
@ManyToMany(cascade = CascadeType.ALL)
@OneToMany(cascade = CascadeType.ALL)
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA, joinColumns = @JoinColumn(name = "org_id"), inverseJoinColumns = @JoinColumn(name = "org_id2"))
protected List<OrganizationType> organization;
@ -100,6 +105,22 @@ public class OrganizationType extends PartyType {
@RegistryObjectReference
protected String primaryContact;
public OrganizationType() {
super();
}
public OrganizationType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public OrganizationType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the organization property.
*
@ -155,4 +176,78 @@ public class OrganizationType extends PartyType {
this.primaryContact = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((organization == null) ? 0 : organization.hashCode());
result = prime * result
+ ((primaryContact == null) ? 0 : primaryContact.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
OrganizationType other = (OrganizationType) obj;
if (organization == null) {
if (other.organization != null)
return false;
} else if (!organization.equals(other.organization))
return false;
if (primaryContact == null) {
if (other.primaryContact != null)
return false;
} else if (!primaryContact.equals(other.primaryContact))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("OrganizationType \n[postalAddress=");
builder.append(postalAddress);
builder.append(", \ntelephoneNumber=");
builder.append(telephoneNumber);
builder.append(", \nemailAddress=");
builder.append(emailAddress);
builder.append(", \nname=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \norganization=");
builder.append(organization);
builder.append(", \nprimaryContact=");
builder.append(primaryContact);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,15 +20,11 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -36,7 +32,6 @@ import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
@ -85,6 +80,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -97,14 +95,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Parameter")
public class ParameterType extends ExtensibleObjectType implements Serializable {
@Id
@SequenceGenerator(name = "ParameterTypeGenerator", schema = RegrepUtil.EBXML_SCHEMA, sequenceName = RegrepUtil.EBXML_SCHEMA
+ ".Parameter_sequence")
@GeneratedValue(generator = "ParameterTypeGenerator")
@XmlTransient
protected Integer key;
public class ParameterType extends ExtensibleObjectType {
private static final long serialVersionUID = -2798644090274364236L;
@ -140,8 +131,8 @@ public class ParameterType extends ExtensibleObjectType implements Serializable
@DynamicSerializeElement
protected BigInteger maxOccurs;
public Integer getKey() {
return key;
public ParameterType() {
super();
}
/**
@ -393,4 +384,29 @@ public class ParameterType extends ExtensibleObjectType implements Serializable
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ParameterType \n[id=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nname=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nparameterName=");
builder.append(parameterName);
builder.append(", \ndataType=");
builder.append(dataType);
builder.append(", \ndefaultValue=");
builder.append(defaultValue);
builder.append(", \nminOccurs=");
builder.append(minOccurs);
builder.append(", \nmaxOccurs=");
builder.append(maxOccurs);
builder.append("]");
return builder.toString();
}
}

View file

@ -25,8 +25,8 @@ import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -70,6 +70,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -84,24 +87,42 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@MappedSuperclass
public abstract class PartyType extends RegistryObjectType {
private static final long serialVersionUID = 4326656165028413864L;
@XmlElement(name = "PostalAddress")
@DynamicSerializeElement
@ManyToMany(cascade = CascadeType.ALL)
@OneToMany(cascade = CascadeType.ALL)
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA)
protected List<PostalAddressType> postalAddress;
@XmlElement(name = "TelephoneNumber")
@DynamicSerializeElement
@ManyToMany(cascade = CascadeType.ALL)
@OneToMany(cascade = CascadeType.ALL)
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA)
protected List<TelephoneNumberType> telephoneNumber;
@XmlElement(name = "EmailAddress")
@DynamicSerializeElement
@ManyToMany(cascade = CascadeType.ALL)
@OneToMany(cascade = CascadeType.ALL)
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA)
protected List<EmailAddressType> emailAddress;
public PartyType() {
super();
}
public PartyType(String id, String lid, String objectType, String owner,
String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public PartyType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the postalAddress property.
*
@ -204,4 +225,81 @@ public abstract class PartyType extends RegistryObjectType {
this.emailAddress = emailAddress;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((emailAddress == null) ? 0 : emailAddress.hashCode());
result = prime * result
+ ((postalAddress == null) ? 0 : postalAddress.hashCode());
result = prime * result
+ ((telephoneNumber == null) ? 0 : telephoneNumber.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
PartyType other = (PartyType) obj;
if (emailAddress == null) {
if (other.emailAddress != null)
return false;
} else if (!emailAddress.equals(other.emailAddress))
return false;
if (postalAddress == null) {
if (other.postalAddress != null)
return false;
} else if (!postalAddress.equals(other.postalAddress))
return false;
if (telephoneNumber == null) {
if (other.telephoneNumber != null)
return false;
} else if (!telephoneNumber.equals(other.telephoneNumber))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("PartyType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \npostalAddress=");
builder.append(postalAddress);
builder.append(", \ntelephoneNumber=");
builder.append(telephoneNumber);
builder.append(", \nemailAddress=");
builder.append(emailAddress);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,10 +20,7 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -68,6 +65,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -80,26 +80,26 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "PersonName")
public class PersonNameType extends ExtensibleObjectType implements
Serializable {
public class PersonNameType extends ExtensibleObjectType {
private static final long serialVersionUID = -7453253089839327032L;
@Id
@XmlAttribute
@DynamicSerializeElement
protected String firstName;
@Id
@XmlAttribute
@DynamicSerializeElement
protected String middleName;
@Id
@XmlAttribute
@DynamicSerializeElement
protected String lastName;
public PersonNameType() {
super();
}
/**
* Gets the value of the firstName property.
*
@ -163,4 +163,61 @@ public class PersonNameType extends ExtensibleObjectType implements
this.lastName = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((firstName == null) ? 0 : firstName.hashCode());
result = prime * result
+ ((lastName == null) ? 0 : lastName.hashCode());
result = prime * result
+ ((middleName == null) ? 0 : middleName.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
PersonNameType other = (PersonNameType) obj;
if (firstName == null) {
if (other.firstName != null)
return false;
} else if (!firstName.equals(other.firstName))
return false;
if (lastName == null) {
if (other.lastName != null)
return false;
} else if (!lastName.equals(other.lastName))
return false;
if (middleName == null) {
if (other.middleName != null)
return false;
} else if (!middleName.equals(other.middleName))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("PersonNameType \n[id=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nfirstName=");
builder.append(firstName);
builder.append(", \nmiddleName=");
builder.append(middleName);
builder.append(", \nlastName=");
builder.append(lastName);
builder.append("]");
return builder.toString();
}
}

View file

@ -22,6 +22,7 @@ package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
@ -67,6 +68,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -82,11 +86,30 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Person")
public class PersonType extends PartyType {
private static final long serialVersionUID = 6759100838752450162L;
@XmlElement(name = "PersonName")
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "personName_id", referencedColumnName = "id")
protected PersonNameType personName;
public PersonType() {
super();
}
public PersonType(String id, String lid, String objectType, String owner,
String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public PersonType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the personName property.
*
@ -108,4 +131,69 @@ public class PersonType extends PartyType {
this.personName = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((personName == null) ? 0 : personName.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
PersonType other = (PersonType) obj;
if (personName == null) {
if (other.personName != null)
return false;
} else if (!personName.equals(other.personName))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("PersonType \n[postalAddress=");
builder.append(postalAddress);
builder.append(", \ntelephoneNumber=");
builder.append(telephoneNumber);
builder.append(", \nemailAddress=");
builder.append(emailAddress);
builder.append(", \nname=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \npersonName=");
builder.append(personName);
builder.append("]");
return builder.toString();
}
}

View file

@ -21,15 +21,11 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
@ -74,6 +70,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -88,12 +87,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "PostalAddress")
public class PostalAddressType extends ExtensibleObjectType {
@Id
@SequenceGenerator(name = "PostalAddressTypeGenerator", schema = RegrepUtil.EBXML_SCHEMA, sequenceName = RegrepUtil.EBXML_SCHEMA
+ ".PostalAddress_sequence")
@GeneratedValue(generator = "PostalAddressTypeGenerator")
@XmlTransient
private Integer key;
private static final long serialVersionUID = 600729702802113902L;
@XmlAttribute
@DynamicSerializeElement
@ -124,8 +118,8 @@ public class PostalAddressType extends ExtensibleObjectType {
@RegistryObjectReference
protected String type;
public Integer getKey() {
return key;
public PostalAddressType() {
super();
}
/**
@ -366,4 +360,29 @@ public class PostalAddressType extends ExtensibleObjectType {
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("PostalAddressType \n[id=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \ncity=");
builder.append(city);
builder.append(", \ncountry=");
builder.append(country);
builder.append(", \npostalCode=");
builder.append(postalCode);
builder.append(", \nstateOrProvince=");
builder.append(stateOrProvince);
builder.append(", \nstreet=");
builder.append(street);
builder.append(", \nstreetNumber=");
builder.append(streetNumber);
builder.append(", \ntype=");
builder.append(type);
builder.append("]");
return builder.toString();
}
}

View file

@ -26,8 +26,8 @@ import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -75,6 +75,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -90,17 +93,35 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "QueryDefinition")
public class QueryDefinitionType extends RegistryObjectType {
@ManyToMany(cascade = CascadeType.ALL)
private static final long serialVersionUID = -2790853301470515632L;
@OneToMany(cascade = CascadeType.ALL)
@XmlElement(name = "Parameter")
@DynamicSerializeElement
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA)
protected List<ParameterType> parameter;
@ManyToOne(cascade = CascadeType.ALL)
@OneToOne(cascade = CascadeType.ALL)
@XmlElement(name = "QueryExpression")
@DynamicSerializeElement
protected QueryExpressionType queryExpression;
public QueryDefinitionType() {
super();
}
public QueryDefinitionType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public QueryDefinitionType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the parameter property.
*
@ -156,4 +177,72 @@ public class QueryDefinitionType extends RegistryObjectType {
this.queryExpression = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((parameter == null) ? 0 : parameter.hashCode());
result = prime * result
+ ((queryExpression == null) ? 0 : queryExpression.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
QueryDefinitionType other = (QueryDefinitionType) obj;
if (parameter == null) {
if (other.parameter != null)
return false;
} else if (!parameter.equals(other.parameter))
return false;
if (queryExpression == null) {
if (other.queryExpression != null)
return false;
} else if (!queryExpression.equals(other.queryExpression))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("QueryDefinitionType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nparameter=");
builder.append(parameter);
builder.append(", \nqueryExpression=");
builder.append(queryExpression);
builder.append("]");
return builder.toString();
}
}

View file

@ -21,18 +21,12 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
@ -75,6 +69,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -88,15 +85,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "QueryExpression")
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class QueryExpressionType extends ExtensibleObjectType {
@Id
@SequenceGenerator(name = "QueryExpressionTypeGenerator", schema = RegrepUtil.EBXML_SCHEMA, sequenceName = RegrepUtil.EBXML_SCHEMA
+ ".QueryExpression_sequence")
@GeneratedValue(generator = "QueryExpressionTypeGenerator")
@XmlTransient
protected Integer key;
private static final long serialVersionUID = 4333123982284573279L;
@XmlAttribute(required = true)
@DynamicSerializeElement
@ -104,7 +95,7 @@ public class QueryExpressionType extends ExtensibleObjectType {
protected String queryLanguage;
public QueryExpressionType() {
super();
}
public QueryExpressionType(String queryLanguage) {
@ -133,4 +124,43 @@ public class QueryExpressionType extends ExtensibleObjectType {
this.queryLanguage = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((queryLanguage == null) ? 0 : queryLanguage.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
QueryExpressionType other = (QueryExpressionType) obj;
if (queryLanguage == null) {
if (other.queryLanguage != null)
return false;
} else if (!queryLanguage.equals(other.queryLanguage))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("QueryExpressionType \n[id=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nqueryLanguage=");
builder.append(queryLanguage);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,18 +20,14 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import java.util.Collection;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
@ -72,6 +68,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -86,12 +85,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Query")
public class QueryType extends ExtensibleObjectType {
@Id
@SequenceGenerator(name = "QueryTypeGenerator", schema = RegrepUtil.EBXML_SCHEMA, sequenceName = RegrepUtil.EBXML_SCHEMA
+ ".Query_sequence")
@GeneratedValue(generator = "QueryTypeGenerator")
@XmlTransient
private Integer key;
private static final long serialVersionUID = -8618442367033794467L;
@XmlAttribute(required = true)
@DynamicSerializeElement
@ -99,11 +93,11 @@ public class QueryType extends ExtensibleObjectType {
protected String queryDefinition;
public QueryType() {
super();
}
public QueryType(String queryDefinition, Collection<SlotType> slots) {
super(slots);
public QueryType(String queryDefinition, List<SlotType> slots) {
super(queryDefinition, slots);
this.queryDefinition = queryDefinition;
}
@ -132,15 +126,47 @@ public class QueryType extends ExtensibleObjectType {
*
*/
public void setQueryDefinition(String value) {
this.id = value;
this.queryDefinition = value;
}
public Integer getKey() {
return key;
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((queryDefinition == null) ? 0 : queryDefinition.hashCode());
return result;
}
public void setKey(Integer key) {
this.key = key;
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
QueryType other = (QueryType) obj;
if (queryDefinition == null) {
if (other.queryDefinition != null)
return false;
} else if (!queryDefinition.equals(other.queryDefinition))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("QueryType \n[id=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nqueryDefinition=");
builder.append(queryDefinition);
builder.append("]");
return builder.toString();
}
}

View file

@ -22,9 +22,11 @@ package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinTable;
@ -78,6 +80,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -95,13 +99,13 @@ public class RegistryObjectListType implements Serializable {
private static final long serialVersionUID = -254507015539461400L;
@Id
@SequenceGenerator(name = "RegistryObjectListTypeGenerator", schema = RegrepUtil.EBXML_SCHEMA, sequenceName = RegrepUtil.EBXML_SCHEMA
@SequenceGenerator(name = "RegistryObjectListGenerator", schema = RegrepUtil.EBXML_SCHEMA, sequenceName = RegrepUtil.EBXML_SCHEMA
+ ".RegistryObjectList_sequence")
@GeneratedValue(generator = "RegistryObjectListTypeGenerator")
@GeneratedValue(generator = "RegistryObjectListGenerator")
@XmlTransient
private Integer key;
private int id;
@ManyToMany
@ManyToMany(fetch = FetchType.EAGER)
@Cascade({})
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA)
@XmlElement(name = "RegistryObject")
@ -132,12 +136,12 @@ public class RegistryObjectListType implements Serializable {
this.registryObject = list;
}
public Integer getKey() {
return key;
public int getId() {
return id;
}
public void setKey(Integer key) {
this.key = key;
public void setId(int id) {
this.id = id;
}
/**
@ -174,6 +178,10 @@ public class RegistryObjectListType implements Serializable {
this.registryObject = registryObject;
}
public void addRegistryObjects(Collection<RegistryObjectType> registryObject) {
getRegistryObject().addAll(registryObject);
}
/*
* (non-Javadoc)
*
@ -215,4 +223,13 @@ public class RegistryObjectListType implements Serializable {
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("RegistryObjectListType \n[registryObject=");
builder.append(registryObject);
builder.append("]");
return builder.toString();
}
}

View file

@ -27,10 +27,9 @@ import javax.persistence.CascadeType;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
@ -93,6 +92,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable, modified persistence annotations, added hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -115,9 +115,14 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL, include = "all")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "RegistryObject")
@org.hibernate.annotations.Table(appliesTo = "RegistryObject", indexes = {
@Index(name = "description_idx", columnNames = { "description_id" }),
@Index(name = "name_idx", columnNames = { "name_id" }) })
public class RegistryObjectType extends IdentifiableType {
private static final long serialVersionUID = -7436174012584469534L;
@XmlElement(name = "Name")
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@ -144,13 +149,13 @@ public class RegistryObjectType extends IdentifiableType {
@XmlElement(name = "ExternalIdentifier")
@DynamicSerializeElement
@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA)
protected Set<ExternalIdentifierType> externalIdentifier;
@XmlElement(name = "ExternalLink")
@DynamicSerializeElement
@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA)
protected Set<ExternalLinkType> externalLink;
@ -178,6 +183,7 @@ public class RegistryObjectType extends IdentifiableType {
* Constructor.
*/
public RegistryObjectType() {
super();
}
/**
@ -454,8 +460,118 @@ public class RegistryObjectType extends IdentifiableType {
this.status = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((classification == null) ? 0 : classification.hashCode());
result = prime * result
+ ((description == null) ? 0 : description.hashCode());
result = prime
* result
+ ((externalIdentifier == null) ? 0 : externalIdentifier
.hashCode());
result = prime * result
+ ((externalLink == null) ? 0 : externalLink.hashCode());
result = prime * result + ((lid == null) ? 0 : lid.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result
+ ((objectType == null) ? 0 : objectType.hashCode());
result = prime * result + ((owner == null) ? 0 : owner.hashCode());
result = prime * result + ((status == null) ? 0 : status.hashCode());
result = prime * result
+ ((versionInfo == null) ? 0 : versionInfo.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
RegistryObjectType other = (RegistryObjectType) obj;
if (classification == null) {
if (other.classification != null)
return false;
} else if (!classification.equals(other.classification))
return false;
if (description == null) {
if (other.description != null)
return false;
} else if (!description.equals(other.description))
return false;
if (externalIdentifier == null) {
if (other.externalIdentifier != null)
return false;
} else if (!externalIdentifier.equals(other.externalIdentifier))
return false;
if (externalLink == null) {
if (other.externalLink != null)
return false;
} else if (!externalLink.equals(other.externalLink))
return false;
if (lid == null) {
if (other.lid != null)
return false;
} else if (!lid.equals(other.lid))
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (objectType == null) {
if (other.objectType != null)
return false;
} else if (!objectType.equals(other.objectType))
return false;
if (owner == null) {
if (other.owner != null)
return false;
} else if (!owner.equals(other.owner))
return false;
if (status == null) {
if (other.status != null)
return false;
} else if (!status.equals(other.status))
return false;
if (versionInfo == null) {
if (other.versionInfo != null)
return false;
} else if (!versionInfo.equals(other.versionInfo))
return false;
return true;
}
@Override
public String toString() {
return this.id;
StringBuilder builder = new StringBuilder();
builder.append("RegistryObjectType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append("]");
return builder.toString();
}
}

View file

@ -70,6 +70,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -84,11 +87,29 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "RegistryPackage")
public class RegistryPackageType extends RegistryObjectType {
@OneToOne(cascade = CascadeType.ALL)
private static final long serialVersionUID = 3646946628073574521L;
@XmlElement(name = "RegistryObjectList")
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
protected RegistryObjectListType registryObjectList;
public RegistryPackageType() {
super();
}
public RegistryPackageType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public RegistryPackageType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the registryObjectList property.
*
@ -110,4 +131,65 @@ public class RegistryPackageType extends RegistryObjectType {
this.registryObjectList = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime
* result
+ ((registryObjectList == null) ? 0 : registryObjectList
.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
RegistryPackageType other = (RegistryPackageType) obj;
if (registryObjectList == null) {
if (other.registryObjectList != null)
return false;
} else if (!registryObjectList.equals(other.registryObjectList))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("RegistryPackageType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nregistryObjectList=");
builder.append(registryObjectList);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,9 +20,9 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@ -35,6 +35,7 @@ import javax.xml.datatype.Duration;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Type;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.registry.schemas.ebxml.util.annotations.RegistryObjectReference;
@ -81,6 +82,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -95,6 +99,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Registry")
public class RegistryType extends RegistryObjectType {
private static final long serialVersionUID = -7896396916703130423L;
@XmlAttribute(required = true)
@XmlSchemaType(name = "anyURI")
@DynamicSerializeElement
@ -109,12 +115,14 @@ public class RegistryType extends RegistryObjectType {
@DynamicSerializeElement
protected String specificationVersion;
@Transient
@Column
@Type(type = "com.raytheon.uf.common.registry.schemas.ebxml.util.DurationType")
@XmlAttribute
@DynamicSerializeElement
protected Duration replicationSyncLatency;
@Transient
@Column
@Type(type = "com.raytheon.uf.common.registry.schemas.ebxml.util.DurationType")
@XmlAttribute
@DynamicSerializeElement
protected Duration catalogingLatency;
@ -124,6 +132,22 @@ public class RegistryType extends RegistryObjectType {
@DynamicSerializeElement
protected String conformanceProfile;
public RegistryType() {
super();
}
public RegistryType(String id, String lid, String objectType, String owner,
String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public RegistryType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the baseURL property.
*
@ -254,4 +278,115 @@ public class RegistryType extends RegistryObjectType {
this.conformanceProfile = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((baseURL == null) ? 0 : baseURL.hashCode());
result = prime
* result
+ ((catalogingLatency == null) ? 0 : catalogingLatency
.hashCode());
result = prime
* result
+ ((conformanceProfile == null) ? 0 : conformanceProfile
.hashCode());
result = prime * result
+ ((operator == null) ? 0 : operator.hashCode());
result = prime
* result
+ ((replicationSyncLatency == null) ? 0
: replicationSyncLatency.hashCode());
result = prime
* result
+ ((specificationVersion == null) ? 0 : specificationVersion
.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
RegistryType other = (RegistryType) obj;
if (baseURL == null) {
if (other.baseURL != null)
return false;
} else if (!baseURL.equals(other.baseURL))
return false;
if (catalogingLatency == null) {
if (other.catalogingLatency != null)
return false;
} else if (!catalogingLatency.equals(other.catalogingLatency))
return false;
if (conformanceProfile == null) {
if (other.conformanceProfile != null)
return false;
} else if (!conformanceProfile.equals(other.conformanceProfile))
return false;
if (operator == null) {
if (other.operator != null)
return false;
} else if (!operator.equals(other.operator))
return false;
if (replicationSyncLatency == null) {
if (other.replicationSyncLatency != null)
return false;
} else if (!replicationSyncLatency.equals(other.replicationSyncLatency))
return false;
if (specificationVersion == null) {
if (other.specificationVersion != null)
return false;
} else if (!specificationVersion.equals(other.specificationVersion))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("RegistryType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nbaseURL=");
builder.append(baseURL);
builder.append(", \noperator=");
builder.append(operator);
builder.append(", \nspecificationVersion=");
builder.append(specificationVersion);
builder.append(", \nreplicationSyncLatency=");
builder.append(replicationSyncLatency);
builder.append(", \ncatalogingLatency=");
builder.append(catalogingLatency);
builder.append(", \nconformanceProfile=");
builder.append(conformanceProfile);
builder.append("]");
return builder.toString();
}
}

View file

@ -68,6 +68,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -82,11 +85,29 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Role")
public class RoleType extends RegistryObjectType {
private static final long serialVersionUID = -6014521625150290261L;
@XmlAttribute(required = true)
@DynamicSerializeElement
@RegistryObjectReference
protected String type;
public RoleType() {
super();
}
public RoleType(String id, String lid, String objectType, String owner,
String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public RoleType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the type property.
*
@ -108,4 +129,62 @@ public class RoleType extends RegistryObjectType {
this.type = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((type == null) ? 0 : type.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
RoleType other = (RoleType) obj;
if (type == null) {
if (other.type != null)
return false;
} else if (!type.equals(other.type))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("RoleType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \ntype=");
builder.append(type);
builder.append("]");
return builder.toString();
}
}

View file

@ -66,6 +66,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -80,11 +83,29 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "ServiceBinding")
public class ServiceBindingType extends RegistryObjectType {
private static final long serialVersionUID = -7893999754736999974L;
@XmlAttribute
@DynamicSerializeElement
@RegistryObjectReference
protected String serviceInterface;
public ServiceBindingType() {
super();
}
public ServiceBindingType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public ServiceBindingType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the serviceInterface property.
*
@ -106,4 +127,64 @@ public class ServiceBindingType extends RegistryObjectType {
this.serviceInterface = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime
* result
+ ((serviceInterface == null) ? 0 : serviceInterface.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
ServiceBindingType other = (ServiceBindingType) obj;
if (serviceInterface == null) {
if (other.serviceInterface != null)
return false;
} else if (!serviceInterface.equals(other.serviceInterface))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ServiceBindingType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nserviceInterface=");
builder.append(serviceInterface);
builder.append("]");
return builder.toString();
}
}

View file

@ -69,6 +69,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -83,6 +86,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "ServiceEndpoint")
public class ServiceEndpointType extends RegistryObjectType {
private static final long serialVersionUID = -6053124239499443175L;
@XmlAttribute
@XmlSchemaType(name = "anyURI")
@DynamicSerializeElement
@ -93,6 +98,22 @@ public class ServiceEndpointType extends RegistryObjectType {
@RegistryObjectReference
protected String serviceBinding;
public ServiceEndpointType() {
super();
}
public ServiceEndpointType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public ServiceEndpointType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the address property.
*
@ -135,4 +156,71 @@ public class ServiceEndpointType extends RegistryObjectType {
this.serviceBinding = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((address == null) ? 0 : address.hashCode());
result = prime * result
+ ((serviceBinding == null) ? 0 : serviceBinding.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
ServiceEndpointType other = (ServiceEndpointType) obj;
if (address == null) {
if (other.address != null)
return false;
} else if (!address.equals(other.address))
return false;
if (serviceBinding == null) {
if (other.serviceBinding != null)
return false;
} else if (!serviceBinding.equals(other.serviceBinding))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ServiceEndpointType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \naddress=");
builder.append(address);
builder.append(", \nserviceBinding=");
builder.append(serviceBinding);
builder.append("]");
return builder.toString();
}
}

View file

@ -21,8 +21,6 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -65,6 +63,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -78,7 +79,27 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@Entity
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "ServiceInterface")
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class ServiceInterfaceType extends RegistryObjectType {
/**
*
*/
private static final long serialVersionUID = -6093907291066228830L;
public ServiceInterfaceType() {
super();
}
public ServiceInterfaceType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public ServiceInterfaceType(String id, String lid) {
super(id, lid);
}
}

View file

@ -26,7 +26,7 @@ import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -76,6 +76,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -90,7 +93,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Service")
public class ServiceType extends RegistryObjectType {
@ManyToMany(cascade = CascadeType.ALL)
private static final long serialVersionUID = -823052926416062225L;
@OneToMany(cascade = CascadeType.ALL)
@XmlElement(name = "ServiceEndpoint")
@DynamicSerializeElement
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA)
@ -101,6 +106,22 @@ public class ServiceType extends RegistryObjectType {
@RegistryObjectReference
protected String serviceInterface;
public ServiceType() {
super();
}
public ServiceType(String id, String lid, String objectType, String owner,
String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public ServiceType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the serviceEndpoint property.
*
@ -156,4 +177,73 @@ public class ServiceType extends RegistryObjectType {
this.serviceInterface = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((serviceEndpoint == null) ? 0 : serviceEndpoint.hashCode());
result = prime
* result
+ ((serviceInterface == null) ? 0 : serviceInterface.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
ServiceType other = (ServiceType) obj;
if (serviceEndpoint == null) {
if (other.serviceEndpoint != null)
return false;
} else if (!serviceEndpoint.equals(other.serviceEndpoint))
return false;
if (serviceInterface == null) {
if (other.serviceInterface != null)
return false;
} else if (!serviceInterface.equals(other.serviceInterface))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ServiceType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nserviceEndpoint=");
builder.append(serviceEndpoint);
builder.append(", \nserviceInterface=");
builder.append(serviceInterface);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,27 +20,19 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Embeddable;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.w3.v1999.xlink.ActuateType;
import org.w3.v1999.xlink.ShowType;
import org.w3.v1999.xlink.TypeType;
import com.raytheon.uf.common.registry.EbxmlNamespaces;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -85,22 +77,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SimpleLinkType")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "SimpleLink")
@Embeddable
public class SimpleLinkType {
@Id
@SequenceGenerator(name = "SimpleLinkTypeGenerator", schema = RegrepUtil.EBXML_SCHEMA, sequenceName = RegrepUtil.EBXML_SCHEMA
+ "SimpleLink_sequence")
@GeneratedValue(generator = "SimpleLinkTypeGenerator")
@XmlTransient
private Integer key;
public Integer getKey() {
return key;
}
@XmlAttribute(namespace = EbxmlNamespaces.XLINK_URI)
@Transient
protected TypeType type;
@ -356,4 +335,25 @@ public class SimpleLinkType {
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("SimpleLinkType \n[type=");
builder.append(type);
builder.append(", \nhref=");
builder.append(href);
builder.append(", \nrole=");
builder.append(role);
builder.append(", \narcrole=");
builder.append(arcrole);
builder.append(", \ntitle=");
builder.append(title);
builder.append(", \nshow=");
builder.append(show);
builder.append(", \nactuate=");
builder.append(actuate);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,24 +20,19 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
@ -86,6 +81,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -98,19 +96,16 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL, include = "all")
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Slot")
@org.hibernate.annotations.Table(appliesTo = "Slot", indexes = {
@Index(name = "slot_idx", columnNames = { "parent_id" }),
@Index(name = "value_idx", columnNames = { "value_id" }) })
public class SlotType extends ExtensibleObjectType implements
IPersistableDataObject<Integer>, Serializable {
IPersistableDataObject<String> {
private static final long serialVersionUID = -2184582316481503043L;
private static final long serialVersionUID = -5563064693536600976L;
@Id
@SequenceGenerator(name = "ExtensibleObjectTypeGenerator", schema = RegrepUtil.EBXML_SCHEMA, sequenceName = RegrepUtil.EBXML_SCHEMA
+ ".Slot_sequence")
@GeneratedValue(generator = "ExtensibleObjectTypeGenerator")
@XmlTransient
private Integer key;
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "value_id", referencedColumnName = "id")
@XmlElement(name = "SlotValue")
@DynamicSerializeElement
protected ValueType slotValue;
@ -123,28 +118,35 @@ public class SlotType extends ExtensibleObjectType implements
@XmlAttribute
@DynamicSerializeElement
@Column(length = 64)
protected String type;
public SlotType() {
}
public SlotType(String name, ValueType slotValue) {
super();
this.slotValue = slotValue;
this.name = name;
}
public SlotType(Collection<SlotType> slots, String name, String type,
ValueType slotValue) {
super(slots);
public SlotType(String id, List<SlotType> slot) {
super(id, slot);
}
public SlotType(ValueType slotValue, String name, String type) {
super();
this.slotValue = slotValue;
this.name = name;
this.type = type;
}
public Integer getKey() {
return key;
public SlotType(String id, List<SlotType> slot, ValueType slotValue,
String name, String type) {
super(id, slot);
this.slotValue = slotValue;
this.name = name;
this.type = type;
}
public SlotType(String name, ValueType slotValue) {
this.name = name;
this.slotValue = slotValue;
}
/*
@ -204,8 +206,21 @@ public class SlotType extends ExtensibleObjectType implements
return true;
}
public void setKey(int key) {
this.key = this.hashCode();
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("SlotType \n[id=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nslotValue=");
builder.append(slotValue);
builder.append(", \nname=");
builder.append(name);
builder.append(", \ntype=");
builder.append(type);
builder.append("]");
return builder.toString();
}
/**
@ -272,8 +287,8 @@ public class SlotType extends ExtensibleObjectType implements
}
@Override
public Integer getIdentifier() {
return key;
public String getIdentifier() {
return id;
}
}

View file

@ -20,8 +20,10 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Column;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -31,7 +33,6 @@ import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Type;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@ -69,6 +70,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -85,50 +89,32 @@ public class SlotValueType extends ValueType {
@XmlElement(name = "Slot")
@DynamicSerializeElement
@Column(name = COLUMN_NAME, columnDefinition = "text")
@Type(type = "com.raytheon.uf.common.registry.schemas.ebxml.util.SerializedType")
@OneToOne(cascade = CascadeType.ALL, optional = true)
@JoinColumn(name = "slot_id", referencedColumnName = "id")
protected SlotType slotValue;
private static final String COLUMN_NAME = "slotValue";
public SlotValueType() {
super();
}
public SlotValueType(Integer id) {
super(id);
}
public SlotValueType(SlotType slotValue) {
super();
this.slotValue = slotValue;
}
@Override
public String getColumnName() {
return COLUMN_NAME;
public SlotValueType(Integer id, SlotType slotValue) {
super(id);
this.slotValue = slotValue;
}
/**
* Gets the value of the slot property.
*
* @return possible object is {@link SlotType }
*
*/
public SlotType getSlot() {
return slotValue;
}
/**
* Sets the value of the slot property.
*
* @param value
* allowed object is {@link SlotType }
*
*/
public void setSlot(SlotType value) {
this.slotValue = value;
}
@Override
@SuppressWarnings("unchecked")
public SlotType getValue() {
return slotValue;
@Override
public <T> T getValue() {
return (T) getSlotValue();
}
public SlotType getSlotValue() {
@ -140,8 +126,34 @@ public class SlotValueType extends ValueType {
}
@Override
public void setValue(Object slotValue) {
this.slotValue = (SlotType) slotValue;
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((slotValue == null) ? 0 : slotValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
SlotValueType other = (SlotValueType) obj;
if (slotValue == null) {
if (other.slotValue != null)
return false;
} else if (!slotValue.equals(other.slotValue))
return false;
return true;
}
@Override
public String toString() {
return "SlotValueType [slotValue=" + slotValue + ", id=" + id + "]";
}
}

View file

@ -68,6 +68,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -82,6 +85,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@DynamicSerialize
public class StringQueryExpressionType extends QueryExpressionType {
private static final long serialVersionUID = 9177009958088269547L;
@XmlElement(name = "Value", required = true)
@DynamicSerializeElement
protected String value;
@ -116,4 +121,44 @@ public class StringQueryExpressionType extends QueryExpressionType {
this.value = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((value == null) ? 0 : value.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
StringQueryExpressionType other = (StringQueryExpressionType) obj;
if (value == null) {
if (other.value != null)
return false;
} else if (!value.equals(other.value))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("StringQueryExpressionType \n[queryLanguage=");
builder.append(queryLanguage);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nvalue=");
builder.append(value);
builder.append("]");
return builder.toString();
}
}

View file

@ -69,6 +69,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -83,51 +86,33 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "StringValue")
public class StringValueType extends ValueType {
@Column(name = COLUMN_NAME, columnDefinition = "text")
@Column(columnDefinition = "text")
@XmlElement(name = "Value")
@DynamicSerializeElement
protected String stringValue;
public StringValueType() {
super();
}
public StringValueType(Integer id) {
super(id);
}
public StringValueType(String stringValue) {
super();
this.stringValue = stringValue;
}
/**
* Gets the value of the value property.
*
* @return possible object is {@link String }
*
*/
@Override
public String getValue() {
return stringValue;
public StringValueType(Integer id, String stringValue) {
super(id);
this.stringValue = stringValue;
}
private static final String COLUMN_NAME = "stringValue";
@SuppressWarnings("unchecked")
@Override
public String getColumnName() {
return COLUMN_NAME;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is {@link String }
*
*/
@Override
public void setValue(Object value) {
this.stringValue = (String) value;
}
public void generateKey() {
this.key = hashCode();
public <T> T getValue() {
return (T) getStringValue();
}
public String getStringValue() {
@ -138,45 +123,36 @@ public class StringValueType extends ValueType {
this.stringValue = stringValue;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
int result = super.hashCode();
result = prime * result
+ ((stringValue == null) ? 0 : stringValue.hashCode());
return result;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
if (this == obj)
return true;
}
if (obj == null) {
if (!super.equals(obj))
return false;
}
if (getClass() != obj.getClass()) {
if (getClass() != obj.getClass())
return false;
}
StringValueType other = (StringValueType) obj;
if (stringValue == null) {
if (other.stringValue != null) {
if (other.stringValue != null)
return false;
}
} else if (!stringValue.equals(other.stringValue)) {
} else if (!stringValue.equals(other.stringValue))
return false;
}
return true;
}
@Override
public String toString() {
return "StringValueType [stringValue=" + stringValue + ", id=" + id
+ "]";
}
}

View file

@ -82,6 +82,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -96,6 +99,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "Subscription")
public class SubscriptionType extends RegistryObjectType {
private static final long serialVersionUID = -4081551671995600532L;
@OneToMany(cascade = CascadeType.ALL)
@XmlElement(name = "DeliveryInfo")
@DynamicSerializeElement
@ -127,6 +132,7 @@ public class SubscriptionType extends RegistryObjectType {
protected Duration notificationInterval;
public SubscriptionType() {
super();
}
@ -136,6 +142,11 @@ public class SubscriptionType extends RegistryObjectType {
}
public SubscriptionType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the deliveryInfo property.
*
@ -254,4 +265,100 @@ public class SubscriptionType extends RegistryObjectType {
this.notificationInterval = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((deliveryInfo == null) ? 0 : deliveryInfo.hashCode());
result = prime * result + ((endTime == null) ? 0 : endTime.hashCode());
result = prime
* result
+ ((notificationInterval == null) ? 0 : notificationInterval
.hashCode());
result = prime * result
+ ((selector == null) ? 0 : selector.hashCode());
result = prime * result
+ ((startTime == null) ? 0 : startTime.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
SubscriptionType other = (SubscriptionType) obj;
if (deliveryInfo == null) {
if (other.deliveryInfo != null)
return false;
} else if (!deliveryInfo.equals(other.deliveryInfo))
return false;
if (endTime == null) {
if (other.endTime != null)
return false;
} else if (!endTime.equals(other.endTime))
return false;
if (notificationInterval == null) {
if (other.notificationInterval != null)
return false;
} else if (!notificationInterval.equals(other.notificationInterval))
return false;
if (selector == null) {
if (other.selector != null)
return false;
} else if (!selector.equals(other.selector))
return false;
if (startTime == null) {
if (other.startTime != null)
return false;
} else if (!startTime.equals(other.startTime))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("SubscriptionType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \ndeliveryInfo=");
builder.append(deliveryInfo);
builder.append(", \nselector=");
builder.append(selector);
builder.append(", \nstartTime=");
builder.append(startTime);
builder.append(", \nendTime=");
builder.append(endTime);
builder.append(", \nnotificationInterval=");
builder.append(notificationInterval);
builder.append("]");
return builder.toString();
}
}

View file

@ -72,6 +72,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -86,12 +89,30 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class TaxonomyElementType extends RegistryObjectType {
private static final long serialVersionUID = 4869675797523033438L;
@ManyToMany(cascade = CascadeType.ALL)
@XmlElement(name = "ClassificationNode")
@DynamicSerializeElement
@JoinTable(schema = RegrepUtil.EBXML_SCHEMA)
protected Set<ClassificationNodeType> classificationNode;
public TaxonomyElementType() {
super();
}
public TaxonomyElementType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public TaxonomyElementType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the classificationNode property.
*
@ -127,4 +148,65 @@ public abstract class TaxonomyElementType extends RegistryObjectType {
this.classificationNode = classificationNode;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime
* result
+ ((classificationNode == null) ? 0 : classificationNode
.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
TaxonomyElementType other = (TaxonomyElementType) obj;
if (classificationNode == null) {
if (other.classificationNode != null)
return false;
} else if (!classificationNode.equals(other.classificationNode))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("TaxonomyElementType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nclassificationNode=");
builder.append(classificationNode);
builder.append("]");
return builder.toString();
}
}

View file

@ -21,15 +21,11 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
@ -72,6 +68,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -87,12 +86,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "TelephoneNumber")
public class TelephoneNumberType extends ExtensibleObjectType {
@Id
@SequenceGenerator(name = "TelephoneNumberTypeGenerator", schema = RegrepUtil.EBXML_SCHEMA, sequenceName = RegrepUtil.EBXML_SCHEMA
+ ".TelephoneNumber_sequence")
@GeneratedValue(generator = "TelephoneNumberTypeGenerator")
@XmlTransient
private Integer key;
private static final long serialVersionUID = 7265219444354141696L;
@XmlAttribute
@DynamicSerializeElement
@ -115,8 +109,8 @@ public class TelephoneNumberType extends ExtensibleObjectType {
@RegistryObjectReference
protected String type;
public Integer getKey() {
return key;
public TelephoneNumberType() {
super();
}
/**
@ -299,4 +293,25 @@ public class TelephoneNumberType extends ExtensibleObjectType {
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("TelephoneNumberType \n[id=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nareaCode=");
builder.append(areaCode);
builder.append(", \ncountryCode=");
builder.append(countryCode);
builder.append(", \nextension=");
builder.append(extension);
builder.append(", \nnumber=");
builder.append(number);
builder.append(", \ntype=");
builder.append(type);
builder.append("]");
return builder.toString();
}
}

View file

@ -70,6 +70,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Removed generic methods
* </pre>
*
* @author bphillip
@ -95,17 +96,55 @@ public abstract class ValueType implements IPersistableDataObject<Integer> {
+ ".Value_sequence")
@GeneratedValue(generator = "ValueTypeGenerator")
@XmlTransient
protected Integer key;
protected Integer id;
public abstract <T extends Object> T getValue();
protected ValueType() {
public abstract void setValue(Object obj);
}
public abstract String getColumnName();
protected ValueType(Integer id) {
this.id = id;
}
@Override
public Integer getIdentifier() {
return key;
return id;
}
public abstract <T> T getValue();
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
ValueType other = (ValueType) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ValueType \n[id=");
builder.append(id);
builder.append("]");
return builder.toString();
}
}

View file

@ -62,6 +62,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Added hashcode and equals
* </pre>
*
* @author bphillip
@ -194,4 +195,37 @@ public class VersionInfoType implements Serializable,
return this.compareTo(obj) <= 0 ? true : false;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((userVersionName == null) ? 0 : userVersionName.hashCode());
result = prime * result
+ ((versionName == null) ? 0 : versionName.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
VersionInfoType other = (VersionInfoType) obj;
if (userVersionName == null) {
if (other.userVersionName != null)
return false;
} else if (!userVersionName.equals(other.userVersionName))
return false;
if (versionName == null) {
if (other.versionName != null)
return false;
} else if (!versionName.equals(other.versionName))
return false;
return true;
}
}

View file

@ -69,6 +69,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -137,4 +139,42 @@ public class VocabularyTermType implements Serializable {
this.term = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((term == null) ? 0 : term.hashCode());
result = prime * result
+ ((vocabulary == null) ? 0 : vocabulary.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
VocabularyTermType other = (VocabularyTermType) obj;
if (term == null) {
if (other.term != null)
return false;
} else if (!term.equals(other.term))
return false;
if (vocabulary == null) {
if (other.vocabulary != null)
return false;
} else if (!vocabulary.equals(other.vocabulary))
return false;
return true;
}
@Override
public String toString() {
return "VocabularyTermType [vocabulary=" + vocabulary + ", term="
+ term + "]";
}
}

View file

@ -20,8 +20,9 @@
package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Column;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -31,7 +32,6 @@ import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Type;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@ -70,6 +70,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -86,53 +89,74 @@ public class VocabularyTermValueType extends ValueType {
@XmlElement(name = "Value")
@DynamicSerializeElement
@Column(name = COLUMN_NAME, columnDefinition = "text")
@Type(type = "com.raytheon.uf.common.registry.schemas.ebxml.util.SerializedType")
@OneToOne(cascade = CascadeType.ALL, optional = true)
protected VocabularyTermType vocabularyTermValue;
private static final String COLUMN_NAME = "vocabularyTermValue";
public VocabularyTermValueType() {
super();
}
public VocabularyTermValueType(Integer id) {
super(id);
}
public VocabularyTermValueType(VocabularyTermType vocabularyTermValue) {
super();
this.vocabularyTermValue = vocabularyTermValue;
}
public VocabularyTermValueType(Integer id,
VocabularyTermType vocabularyTermValue) {
super(id);
this.vocabularyTermValue = vocabularyTermValue;
}
@SuppressWarnings("unchecked")
@Override
public <T> T getValue() {
return (T) getVocabularyTermValue();
}
public VocabularyTermType getVocabularyTermValue() {
return vocabularyTermValue;
}
public void setVocabularyTermValue(VocabularyTermType vocabularyTermValue) {
this.vocabularyTermValue = vocabularyTermValue;
}
@Override
public String getColumnName() {
return COLUMN_NAME;
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime
* result
+ ((vocabularyTermValue == null) ? 0 : vocabularyTermValue
.hashCode());
return result;
}
/**
* Gets the value of the value property.
*
* @return possible object is {@link VocabularyTermType }
*
*/
@Override
public VocabularyTermType getValue() {
return vocabularyTermValue;
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
VocabularyTermValueType other = (VocabularyTermValueType) obj;
if (vocabularyTermValue == null) {
if (other.vocabularyTermValue != null)
return false;
} else if (!vocabularyTermValue.equals(other.vocabularyTermValue))
return false;
return true;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is {@link VocabularyTermType }
*
*/
@Override
public void setValue(Object value) {
this.vocabularyTermValue = (VocabularyTermType) value;
public String toString() {
return "VocabularyTermValueType [vocabularyTermValue="
+ vocabularyTermValue + ", id=" + id + "]";
}
public VocabularyTermType getVocabularyTermValue() {
return getValue();
}
public void setVocabularyTermValue(VocabularyTermType vocabularyTermValue) {
setValue(vocabularyTermValue);
}
}

View file

@ -66,6 +66,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -80,6 +83,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "WorkflowAction")
public class WorkflowActionType extends RegistryObjectType {
private static final long serialVersionUID = 4858286404788145442L;
@XmlAttribute(required = true)
@DynamicSerializeElement
protected String actionType;
@ -88,6 +93,19 @@ public class WorkflowActionType extends RegistryObjectType {
@DynamicSerializeElement
protected String targetObject;
public WorkflowActionType() {
super();
}
public WorkflowActionType(String id, String lid, String objectType,
String owner, String status, String name, String description) {
super(id, lid, objectType, owner, status, name, description);
}
public WorkflowActionType(String id, String lid) {
super(id, lid);
}
/**
* Gets the value of the actionType property.
*
@ -130,4 +148,72 @@ public class WorkflowActionType extends RegistryObjectType {
this.targetObject = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((actionType == null) ? 0 : actionType.hashCode());
result = prime * result
+ ((targetObject == null) ? 0 : targetObject.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
WorkflowActionType other = (WorkflowActionType) obj;
if (actionType == null) {
if (other.actionType != null)
return false;
} else if (!actionType.equals(other.actionType))
return false;
if (targetObject == null) {
if (other.targetObject != null)
return false;
} else if (!targetObject.equals(other.targetObject))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("WorkflowActionType \n[name=");
builder.append(name);
builder.append(", \ndescription=");
builder.append(description);
builder.append(", \nversionInfo=");
builder.append(versionInfo);
builder.append(", \nclassification=");
builder.append(classification);
builder.append(", \nexternalIdentifier=");
builder.append(externalIdentifier);
builder.append(", \nexternalLink=");
builder.append(externalLink);
builder.append(", \nlid=");
builder.append(lid);
builder.append(", \nobjectType=");
builder.append(objectType);
builder.append(", \nowner=");
builder.append(owner);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nactionType=");
builder.append(actionType);
builder.append(", \ntargetObject=");
builder.append(targetObject);
builder.append("]");
return builder.toString();
}
}

View file

@ -71,6 +71,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -85,6 +88,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@DynamicSerialize
public class XMLQueryExpressionType extends QueryExpressionType {
private static final long serialVersionUID = -4520183948278760674L;
@XmlAnyElement(lax = true)
@DynamicSerializeElement
@Column(name = "anyValue", columnDefinition = "text")
@ -121,4 +126,44 @@ public class XMLQueryExpressionType extends QueryExpressionType {
this.any = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((any == null) ? 0 : any.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
XMLQueryExpressionType other = (XMLQueryExpressionType) obj;
if (any == null) {
if (other.any != null)
return false;
} else if (!any.equals(other.any))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("XMLQueryExpressionType \n[queryLanguage=");
builder.append(queryLanguage);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nany=");
builder.append(any);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,11 +20,17 @@
package oasis.names.tc.ebxml.regrep.xsd.rs.v4;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
@ -54,6 +60,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -63,6 +72,18 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AuthenticationExceptionType")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA)
public class AuthenticationExceptionType extends RegistryExceptionType {
/**
*
*/
private static final long serialVersionUID = -1680517345278667525L;
public AuthenticationExceptionType() {
super();
}
}

View file

@ -20,11 +20,17 @@
package oasis.names.tc.ebxml.regrep.xsd.rs.v4;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
@ -54,6 +60,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -63,6 +72,18 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AuthorizationExceptionType")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA)
public class AuthorizationExceptionType extends RegistryExceptionType {
/**
*
*/
private static final long serialVersionUID = 6031092631369003424L;
public AuthorizationExceptionType() {
super();
}
}

View file

@ -20,11 +20,17 @@
package oasis.names.tc.ebxml.regrep.xsd.rs.v4;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
@ -54,6 +60,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -63,6 +72,18 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "InvalidRequestExceptionType")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA)
public class InvalidRequestExceptionType extends RegistryExceptionType {
/**
*
*/
private static final long serialVersionUID = -6491364846022684805L;
public InvalidRequestExceptionType() {
super();
}
}

View file

@ -20,11 +20,17 @@
package oasis.names.tc.ebxml.regrep.xsd.rs.v4;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
@ -54,6 +60,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -64,6 +73,18 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ObjectExistsExceptionType")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA)
public class ObjectExistsExceptionType extends RegistryExceptionType {
/**
*
*/
private static final long serialVersionUID = 8032552265981470279L;
public ObjectExistsExceptionType() {
super();
}
}

View file

@ -20,11 +20,17 @@
package oasis.names.tc.ebxml.regrep.xsd.rs.v4;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
@ -54,6 +60,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -63,6 +72,18 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ObjectNotFoundExceptionType")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA)
public class ObjectNotFoundExceptionType extends RegistryExceptionType {
/**
*
*/
private static final long serialVersionUID = -1242493094762808286L;
public ObjectNotFoundExceptionType() {
super();
}
}

View file

@ -20,11 +20,17 @@
package oasis.names.tc.ebxml.regrep.xsd.rs.v4;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
@ -54,6 +60,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -63,6 +72,19 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "QuotaExceededExceptionType")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA)
public class QuotaExceededExceptionType extends RegistryExceptionType {
/**
*
*/
private static final long serialVersionUID = 6932088926597616719L;
public QuotaExceededExceptionType() {
super();
}
}

View file

@ -20,11 +20,17 @@
package oasis.names.tc.ebxml.regrep.xsd.rs.v4;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
@ -54,6 +60,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -63,6 +72,19 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ReferencesExistExceptionType")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA)
public class ReferencesExistExceptionType extends RegistryExceptionType {
/**
*
*/
private static final long serialVersionUID = 3104391286688568034L;
public ReferencesExistExceptionType() {
super();
}
}

View file

@ -20,6 +20,8 @@
package oasis.names.tc.ebxml.regrep.xsd.rs.v4;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@ -33,6 +35,10 @@ import oasis.names.tc.ebxml.regrep.xsd.spi.v4.CatalogingExceptionType;
import oasis.names.tc.ebxml.regrep.xsd.spi.v4.FilteringExceptionType;
import oasis.names.tc.ebxml.regrep.xsd.spi.v4.ValidationExceptionType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -68,6 +74,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -86,8 +95,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
FilteringExceptionType.class, ValidationExceptionType.class,
CatalogingExceptionType.class })
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "RegistryException")
public class RegistryExceptionType extends ExtensibleObjectType {
private static final long serialVersionUID = -811672255660498468L;
@XmlAttribute
@DynamicSerializeElement
protected String code;
@ -104,6 +118,10 @@ public class RegistryExceptionType extends ExtensibleObjectType {
@DynamicSerializeElement
protected String severity;
public RegistryExceptionType() {
super();
}
/**
* Gets the value of the code property.
*
@ -194,18 +212,65 @@ public class RegistryExceptionType extends ExtensibleObjectType {
@Override
public String toString() {
StringBuilder strBuilder = new StringBuilder();
if (code == null) {
strBuilder.append("\t CODE: ").append("NONE SPECIFIED")
.append("]\n");
} else {
strBuilder.append("\t CODE: ").append(code).append("\n");
}
strBuilder.append("\tSEVERITY: ").append(severity).append("\n");
strBuilder.append("\t MESSAGE: ").append(message).append("\n");
strBuilder.append("\t DETAIL: ").append(detail).append("\n");
return strBuilder.toString();
StringBuilder builder = new StringBuilder();
builder.append("RegistryExceptionType \n[id=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \ncode=");
builder.append(code);
builder.append(", \ndetail=");
builder.append(detail);
builder.append(", \nmessage=");
builder.append(message);
builder.append(", \nseverity=");
builder.append(severity);
builder.append("]");
return builder.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((code == null) ? 0 : code.hashCode());
result = prime * result + ((detail == null) ? 0 : detail.hashCode());
result = prime * result + ((message == null) ? 0 : message.hashCode());
result = prime * result
+ ((severity == null) ? 0 : severity.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
RegistryExceptionType other = (RegistryExceptionType) obj;
if (code == null) {
if (other.code != null)
return false;
} else if (!code.equals(other.code))
return false;
if (detail == null) {
if (other.detail != null)
return false;
} else if (!detail.equals(other.detail))
return false;
if (message == null) {
if (other.message != null)
return false;
} else if (!message.equals(other.message))
return false;
if (severity == null) {
if (other.severity != null)
return false;
} else if (!severity.equals(other.severity))
return false;
return true;
}
}

View file

@ -20,9 +20,11 @@
package oasis.names.tc.ebxml.regrep.xsd.rs.v4;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@ -40,6 +42,10 @@ import oasis.names.tc.ebxml.regrep.xsd.spi.v4.CatalogObjectsRequest;
import oasis.names.tc.ebxml.regrep.xsd.spi.v4.FilterObjectsRequest;
import oasis.names.tc.ebxml.regrep.xsd.spi.v4.ValidateObjectsRequest;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -72,6 +78,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -85,29 +94,29 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
UpdateObjectsRequest.class, SubmitObjectsRequest.class,
RemoveObjectsRequest.class })
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL, include = "all")
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "RegistryRequest")
public class RegistryRequestType extends ExtensibleObjectType {
@XmlAttribute(required = true)
@DynamicSerializeElement
protected String id;
private static final long serialVersionUID = 4127177436730907012L;
@XmlAttribute
@DynamicSerializeElement
protected String comment;
public RegistryRequestType() {
super();
}
public RegistryRequestType(String id, String comment,
Collection<SlotType> slots) {
super(slots);
public RegistryRequestType(String id, String comment, List<SlotType> slots) {
super(id, slots);
this.id = id;
this.comment = comment;
}
public RegistryRequestType(String id, String comment) {
this(id, comment, Collections.<SlotType> emptySet());
this(id, comment, Collections.<SlotType> emptyList());
}
@ -117,19 +126,14 @@ public class RegistryRequestType extends ExtensibleObjectType {
* @return possible object is {@link String }
*
*/
@XmlAttribute(required = true)
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setId(String value) {
this.id = value;
@Override
public void setId(String id) {
super.setId(id);
}
/**
@ -153,4 +157,42 @@ public class RegistryRequestType extends ExtensibleObjectType {
this.comment = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((comment == null) ? 0 : comment.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
RegistryRequestType other = (RegistryRequestType) obj;
if (comment == null) {
if (other.comment != null)
return false;
} else if (!comment.equals(other.comment))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("RegistryRequestType \n[id=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \ncomment=");
builder.append(comment);
builder.append("]");
return builder.toString();
}
}

View file

@ -25,6 +25,13 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@ -44,7 +51,11 @@ import oasis.names.tc.ebxml.regrep.xsd.spi.v4.CatalogObjectsResponse;
import oasis.names.tc.ebxml.regrep.xsd.spi.v4.FilterObjectsResponse;
import oasis.names.tc.ebxml.regrep.xsd.spi.v4.ValidateObjectsResponse;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.EbxmlNamespaces;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.raytheon.uf.common.util.CollectionUtil;
@ -83,6 +94,9 @@ import com.raytheon.uf.common.util.CollectionUtil;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -96,18 +110,27 @@ import com.raytheon.uf.common.util.CollectionUtil;
@XmlSeeAlso({ ValidateObjectsResponse.class, CatalogObjectsResponse.class,
FilterObjectsResponse.class, QueryResponse.class })
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "RegistryResponse")
public class RegistryResponseType extends ExtensibleObjectType {
private static final long serialVersionUID = 3258800433937559672L;
@XmlElement(name = "Exception")
@DynamicSerializeElement
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "exception_id", nullable = false, referencedColumnName = "id")
protected List<RegistryExceptionType> exception;
@XmlElement(name = "RegistryObjectList", namespace = EbxmlNamespaces.RIM_URI)
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
protected RegistryObjectListType registryObjectList;
@XmlElement(name = "ObjectRefList", namespace = EbxmlNamespaces.RIM_URI)
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
protected ObjectRefListType objectRefList;
@XmlAttribute(required = true)
@ -119,6 +142,10 @@ public class RegistryResponseType extends ExtensibleObjectType {
@DynamicSerializeElement
protected String requestId;
public RegistryResponseType() {
super();
}
public boolean isOk() {
return status.equals(RegistryResponseStatus.SUCCESS);
}
@ -282,4 +309,77 @@ public class RegistryResponseType extends ExtensibleObjectType {
this.requestId = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((exception == null) ? 0 : exception.hashCode());
result = prime * result
+ ((objectRefList == null) ? 0 : objectRefList.hashCode());
result = prime
* result
+ ((registryObjectList == null) ? 0 : registryObjectList
.hashCode());
result = prime * result
+ ((requestId == null) ? 0 : requestId.hashCode());
result = prime * result + ((status == null) ? 0 : status.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
RegistryResponseType other = (RegistryResponseType) obj;
if (exception == null) {
if (other.exception != null)
return false;
} else if (!exception.equals(other.exception))
return false;
if (objectRefList == null) {
if (other.objectRefList != null)
return false;
} else if (!objectRefList.equals(other.objectRefList))
return false;
if (registryObjectList == null) {
if (other.registryObjectList != null)
return false;
} else if (!registryObjectList.equals(other.registryObjectList))
return false;
if (requestId == null) {
if (other.requestId != null)
return false;
} else if (!requestId.equals(other.requestId))
return false;
if (status != other.status)
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("RegistryResponseType \n[id=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nexception=");
builder.append(exception);
builder.append(", \nregistryObjectList=");
builder.append(registryObjectList);
builder.append(", \nobjectRefList=");
builder.append(objectRefList);
builder.append(", \nstatus=");
builder.append(status);
builder.append(", \nrequestId=");
builder.append(requestId);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,11 +20,17 @@
package oasis.names.tc.ebxml.regrep.xsd.rs.v4;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
@ -54,6 +60,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -64,6 +73,19 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TimeoutExceptionType")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA)
public class TimeoutExceptionType extends RegistryExceptionType {
/**
*
*/
private static final long serialVersionUID = 2214771898465219269L;
public TimeoutExceptionType() {
super();
}
}

View file

@ -20,11 +20,17 @@
package oasis.names.tc.ebxml.regrep.xsd.rs.v4;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
@ -54,6 +60,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -63,6 +72,19 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "UnresolvedReferenceExceptionType")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA)
public class UnresolvedReferenceExceptionType extends RegistryExceptionType {
/**
*
*/
private static final long serialVersionUID = 193078724433971207L;
public UnresolvedReferenceExceptionType() {
super();
}
}

View file

@ -20,11 +20,17 @@
package oasis.names.tc.ebxml.regrep.xsd.rs.v4;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
@ -54,6 +60,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -64,6 +73,19 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "UnsupportedCapabilityExceptionType")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA)
public class UnsupportedCapabilityExceptionType extends RegistryExceptionType {
/**
*
*/
private static final long serialVersionUID = -1735177750124442588L;
public UnsupportedCapabilityExceptionType() {
super();
}
}

View file

@ -21,9 +21,14 @@
package oasis.names.tc.ebxml.regrep.xsd.spi.v4;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -37,7 +42,11 @@ import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectListType;
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotType;
import oasis.names.tc.ebxml.regrep.xsd.rs.v4.RegistryRequestType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.EbxmlNamespaces;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -72,6 +81,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -82,30 +94,40 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
"invocationControlFile" })
@XmlRootElement(name = "CatalogObjectsRequest")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "CatalogObjectsRequest")
public class CatalogObjectsRequest extends RegistryRequestType {
private static final long serialVersionUID = -1231369260237037178L;
@XmlElement(name = "Query")
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "query_id", referencedColumnName = "id")
protected QueryType query;
@XmlElement(name = "ObjectRefList", namespace = EbxmlNamespaces.RIM_URI)
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
protected ObjectRefListType objectRefList;
@XmlElement(name = "OriginalObjects")
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
protected RegistryObjectListType originalObjects;
@XmlElement(name = "InvocationControlFile")
@DynamicSerializeElement
@Transient
protected List<ExtrinsicObjectType> invocationControlFile;
public CatalogObjectsRequest() {
super();
}
public CatalogObjectsRequest(String id, String comment,
Collection<SlotType> slots, QueryType query,
List<SlotType> slots, QueryType query,
ObjectRefListType objectRefList,
RegistryObjectListType originalObjects,
List<ExtrinsicObjectType> invocationControlFile) {
@ -214,4 +236,73 @@ public class CatalogObjectsRequest extends RegistryRequestType {
this.invocationControlFile = invocationControlFile;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime
* result
+ ((invocationControlFile == null) ? 0 : invocationControlFile
.hashCode());
result = prime * result
+ ((objectRefList == null) ? 0 : objectRefList.hashCode());
result = prime * result
+ ((originalObjects == null) ? 0 : originalObjects.hashCode());
result = prime * result + ((query == null) ? 0 : query.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
CatalogObjectsRequest other = (CatalogObjectsRequest) obj;
if (invocationControlFile == null) {
if (other.invocationControlFile != null)
return false;
} else if (!invocationControlFile.equals(other.invocationControlFile))
return false;
if (objectRefList == null) {
if (other.objectRefList != null)
return false;
} else if (!objectRefList.equals(other.objectRefList))
return false;
if (originalObjects == null) {
if (other.originalObjects != null)
return false;
} else if (!originalObjects.equals(other.originalObjects))
return false;
if (query == null) {
if (other.query != null)
return false;
} else if (!query.equals(other.query))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("CatalogObjectsRequest \n[comment=");
builder.append(comment);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \nquery=");
builder.append(query);
builder.append(", \nobjectRefList=");
builder.append(objectRefList);
builder.append(", \noriginalObjects=");
builder.append(originalObjects);
builder.append(", \ninvocationControlFile=");
builder.append(invocationControlFile);
builder.append("]");
return builder.toString();
}
}

View file

@ -20,6 +20,8 @@
package oasis.names.tc.ebxml.regrep.xsd.spi.v4;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@ -27,6 +29,10 @@ import javax.xml.bind.annotation.XmlType;
import oasis.names.tc.ebxml.regrep.xsd.rs.v4.RegistryResponseType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
@ -54,6 +60,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -63,6 +72,18 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@XmlType(name = "")
@XmlRootElement(name = "CatalogObjectsResponse")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "CatalogObjectsResponse")
public class CatalogObjectsResponse extends RegistryResponseType {
/**
*
*/
private static final long serialVersionUID = 4375905907208271391L;
public CatalogObjectsResponse() {
super();
}
}

View file

@ -20,6 +20,8 @@
package oasis.names.tc.ebxml.regrep.xsd.spi.v4;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@ -27,6 +29,10 @@ import javax.xml.bind.annotation.XmlType;
import oasis.names.tc.ebxml.regrep.xsd.rs.v4.RegistryExceptionType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
@ -56,6 +62,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -65,6 +74,18 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CatalogingExceptionType")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA)
public class CatalogingExceptionType extends RegistryExceptionType {
/**
*
*/
private static final long serialVersionUID = 8010832661027868445L;
public CatalogingExceptionType() {
super();
}
}

View file

@ -21,9 +21,13 @@
package oasis.names.tc.ebxml.regrep.xsd.spi.v4;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -35,6 +39,10 @@ import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectListType;
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotType;
import oasis.names.tc.ebxml.regrep.xsd.rs.v4.RegistryRequestType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.raytheon.uf.common.registry.RegrepUtil;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -67,6 +75,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- --------------------------
* 2012 bphillip Initial implementation
* 10/17/2013 1682 bphillip Added software history
* 12/2/2013 1829 bphillip Made ExtensibleObjectType persistable,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* </pre>
*
* @author bphillip
@ -76,22 +87,29 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlType(name = "", propOrder = { "originalObjects", "invocationControlFile" })
@XmlRootElement(name = "FilterObjectsRequest")
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "FilterObjectsRequest")
public class FilterObjectsRequest extends RegistryRequestType {
private static final long serialVersionUID = -6787229864622986621L;
@XmlElement(name = "OriginalObjects", required = true)
@DynamicSerializeElement
@OneToOne(cascade = CascadeType.ALL)
protected RegistryObjectListType originalObjects;
@XmlElement(name = "InvocationControlFile")
@DynamicSerializeElement
@Transient
protected List<ExtrinsicObjectType> invocationControlFile;
public FilterObjectsRequest() {
super();
}
public FilterObjectsRequest(String id, String comment,
Collection<SlotType> slots, RegistryObjectListType originalObjects,
List<SlotType> slots, RegistryObjectListType originalObjects,
List<ExtrinsicObjectType> invocationControlFile) {
super(id, comment, slots);
this.originalObjects = originalObjects;
@ -154,4 +172,56 @@ public class FilterObjectsRequest extends RegistryRequestType {
this.invocationControlFile = invocationControlFile;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime
* result
+ ((invocationControlFile == null) ? 0 : invocationControlFile
.hashCode());
result = prime * result
+ ((originalObjects == null) ? 0 : originalObjects.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
FilterObjectsRequest other = (FilterObjectsRequest) obj;
if (invocationControlFile == null) {
if (other.invocationControlFile != null)
return false;
} else if (!invocationControlFile.equals(other.invocationControlFile))
return false;
if (originalObjects == null) {
if (other.originalObjects != null)
return false;
} else if (!originalObjects.equals(other.originalObjects))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("FilterObjectsRequest \n[comment=");
builder.append(comment);
builder.append(", \nid=");
builder.append(id);
builder.append(", \nslot=");
builder.append(slot);
builder.append(", \noriginalObjects=");
builder.append(originalObjects);
builder.append(", \ninvocationControlFile=");
builder.append(invocationControlFile);
builder.append("]");
return builder.toString();
}
}

Some files were not shown because too many files have changed in this diff Show more