All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ccsds.moims.mo.common.configuration.structures.ConfigurationObjectDetails Maven / Gradle / Ivy

package org.ccsds.moims.mo.common.configuration.structures;

/**
 * The ConfigurationObjectDetails composite holds a zero to many ConfigurationObjectSet 
 * structures. It allows a configuration to reference COM objects from more 
 * than one domain or of more than one COM object type. 
 */
public final class ConfigurationObjectDetails implements org.ccsds.moims.mo.mal.structures.Composite {

    /**
     * Short form for type.
     */
    @Deprecated
    private static final Integer TYPE_SHORT_FORM = 2;
    /**
     * Absolute short form for type. This will be replaced by the TypeId.
     */
    @Deprecated
    public static final Long SHORT_FORM = 844446421745666L;
    private static final long serialVersionUID = 844446421745666L;
    /**
     * Absolute short form for type.
     */
    public static final org.ccsds.moims.mo.mal.TypeId TYPE_ID = new org.ccsds.moims.mo.mal.TypeId(SHORT_FORM);

    /**
     * The list of configuration objects.
     */
    private org.ccsds.moims.mo.common.configuration.structures.ConfigurationObjectSetList configObjects;

    /**
     * Default constructor for ConfigurationObjectDetails.
     * 
     */
    public ConfigurationObjectDetails() {
    }

    /**
     * Constructor that initialises the values of the structure.
     * 
     * @param configObjects The list of configuration objects.
     */
    public ConfigurationObjectDetails(org.ccsds.moims.mo.common.configuration.structures.ConfigurationObjectSetList configObjects) {
        this.configObjects = configObjects;
    }

    /**
     * Creates an instance of this type using the default constructor. It is a 
     * generic factory method. 
     * 
     * @return A new instance of this type with default field values.
     */
    public org.ccsds.moims.mo.mal.structures.Element createElement() {
        return new org.ccsds.moims.mo.common.configuration.structures.ConfigurationObjectDetails();
    }

    /**
     * Returns the field configObjects.
     * 
     * @return The field configObjects.
     */
    public org.ccsds.moims.mo.common.configuration.structures.ConfigurationObjectSetList getConfigObjects() {
        return configObjects;
    }

    /**
     * Sets the field configObjects.
     * 
     * @param __newValue The new value.
     */
    @Deprecated
    public void setConfigObjects(org.ccsds.moims.mo.common.configuration.structures.ConfigurationObjectSetList __newValue) {
        configObjects = __newValue;
    }

    /**
     * Compares this object to the specified object. The result is true if and 
     * only if the argument is not null and is the same type that contains the 
     * same value as this object. 
     * 
     * @param obj The object to compare with.
     * @return true if the objects are the same; false otherwise.
     */
    public boolean equals(Object obj) {
        if (obj instanceof ConfigurationObjectDetails) {
            ConfigurationObjectDetails other = (ConfigurationObjectDetails) obj;
            if (configObjects == null) {
                if (other.configObjects != null) {
                    return false;
                }
            } else {
                if (! configObjects.equals(other.configObjects)) {
                    return false;
                }
            }
            return true;
        }
        return false;
    }

    /**
     * Returns a hash code for this object.
     * 
     * @return a hash code value for this object.
     */
    public int hashCode() {
        int hash = 7;
        hash = 83 * hash + (configObjects != null ? configObjects.hashCode() : 0);
        return hash;
    }

    /**
     * Returns a String object representing this type"s value.
     * 
     * @return a string representation of the value of this object.
     */
    public String toString() {
        StringBuilder buf = new StringBuilder();
        buf.append("(ConfigurationObjectDetails: ");
        buf.append("configObjects=");
        buf.append(configObjects);
        buf.append(')');
        return buf.toString();
    }

    /**
     * Encodes the value of this object using the provided MALEncoder.
     * 
     * @param encoder The encoder to use for encoding.
     * @throws org.ccsds.moims.mo.mal.MALException if any encoding errors are 
     * detected. 
     */
    public void encode(org.ccsds.moims.mo.mal.MALEncoder encoder) throws org.ccsds.moims.mo.mal.MALException {
        if (configObjects == null) {
            throw new org.ccsds.moims.mo.mal.MALException("The field 'configObjects' cannot be null!");
        }
        encoder.encodeElement(configObjects);
    }

    /**
     * Decodes the value of this object using the provided MALDecoder.
     * 
     * @param decoder The decoder to use for decoding.
     * @return Returns this object.
     * @throws org.ccsds.moims.mo.mal.MALException if any decoding errors are 
     * detected. 
     */
    public org.ccsds.moims.mo.mal.structures.Element decode(org.ccsds.moims.mo.mal.MALDecoder decoder) throws org.ccsds.moims.mo.mal.MALException {
        configObjects = (org.ccsds.moims.mo.common.configuration.structures.ConfigurationObjectSetList) decoder.decodeElement(new org.ccsds.moims.mo.common.configuration.structures.ConfigurationObjectSetList());
        return this;
    }

    /**
     * Returns the absolute short form of this type.
     * 
     * @return The absolute short form of this type.
     */
    public Long getShortForm() {
        return SHORT_FORM;
    }

    /**
     * Returns the type short form of this type which is unique to the area/service 
     * it is defined in but not unique across all types. 
     * 
     * @return The type short form of this type.
     */
    public Integer getTypeShortForm() {
        return TYPE_SHORT_FORM;
    }

    /**
     * Returns the area number of this type.
     * 
     * @return The area number of this type.
     */
    public org.ccsds.moims.mo.mal.structures.UShort getAreaNumber() {
        return org.ccsds.moims.mo.common.CommonHelper.COMMON_AREA_NUMBER;
    }

    /**
     * Returns the area version of this type.
     * 
     * @return The area number of this type.
     */
    public org.ccsds.moims.mo.mal.structures.UOctet getAreaVersion() {
        return org.ccsds.moims.mo.common.CommonHelper.COMMON_AREA_VERSION;
    }

    /**
     * Returns the service number of this type.
     * 
     * @return The service number of this type.
     */
    public org.ccsds.moims.mo.mal.structures.UShort getServiceNumber() {
        return org.ccsds.moims.mo.common.configuration.ConfigurationServiceInfo.CONFIGURATION_SERVICE_NUMBER;
    }

    /**
     * Returns the TypeId of this element.
     * 
     * @return The TypeId of this element.
     */
    public org.ccsds.moims.mo.mal.TypeId getTypeId() {
        return TYPE_ID;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy