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

net.officefloor.woof.model.objects.WoofDependencyModel Maven / Gradle / Ivy

There is a newer version: 3.40.0
Show newest version
/*
 * 
 */
package net.officefloor.woof.model.objects;

import javax.annotation.Generated;

import net.officefloor.model.AbstractModel;
import net.officefloor.model.ConnectionModel;
import net.officefloor.model.ItemModel;
import net.officefloor.model.RemoveConnectionsAction;

@Generated("net.officefloor.model.generate.ModelGenerator")
public class WoofDependencyModel extends AbstractModel implements ItemModel {

    public static enum WoofDependencyEvent {
     CHANGE_NAME, CHANGE_QUALIFIER, CHANGE_TYPE
    }

    /**
     * Default constructor.
     */
    public WoofDependencyModel() {
    }

    /**
     * Convenience constructor.
     *
     * @param name Name.
     * @param qualifier Qualifier.
     * @param type Type.
     */
    public WoofDependencyModel(
      String name
    , String qualifier
    , String type
    ) {
        this.name = name;
        this.qualifier = qualifier;
        this.type = type;
    }

    /**
     * Convenience constructor allowing XY initialising.
     *
     * @param name Name.
     * @param qualifier Qualifier.
     * @param type Type.
     * @param x Horizontal location.
     * @param y Vertical location.
     */
    public WoofDependencyModel(
      String name
    , String qualifier
    , String type
    , int x
    , int y
    ) {
        this.name = name;
        this.qualifier = qualifier;
        this.type = type;
        this.setX(x);
        this.setY(y);
    }


    /**
     * Name.
     */
    private String name;

    /**
     * @return Name.
     */
    public String getName() {
        return this.name;
    }

    /**
     * @param name Name.
     */
    public void setName(String name) {
        String oldValue = this.name;
        this.name = name;
        this.changeField(oldValue, this.name, WoofDependencyEvent.CHANGE_NAME);
    }


    /**
     * Qualifier.
     */
    private String qualifier;

    /**
     * @return Qualifier.
     */
    public String getQualifier() {
        return this.qualifier;
    }

    /**
     * @param qualifier Qualifier.
     */
    public void setQualifier(String qualifier) {
        String oldValue = this.qualifier;
        this.qualifier = qualifier;
        this.changeField(oldValue, this.qualifier, WoofDependencyEvent.CHANGE_QUALIFIER);
    }


    /**
     * Type.
     */
    private String type;

    /**
     * @return Type.
     */
    public String getType() {
        return this.type;
    }

    /**
     * @param type Type.
     */
    public void setType(String type) {
        String oldValue = this.type;
        this.type = type;
        this.changeField(oldValue, this.type, WoofDependencyEvent.CHANGE_TYPE);
    }


    /**
     * Remove Connections.
     *
     * @return {@link RemoveConnectionsAction} to remove the {@link ConnectionModel} instances.
     */
    public RemoveConnectionsAction removeConnections() {
        RemoveConnectionsAction _action = new RemoveConnectionsAction(this);
        return _action;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy