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

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

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

import java.util.List;
import java.util.LinkedList;

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 WoofPoolModel extends AbstractModel implements ItemModel {

    public static enum WoofPoolEvent {
     CHANGE_MANAGED_OBJECT_POOL_SOURCE_CLASS_NAME, ADD_PROPERTY_SOURCE, REMOVE_PROPERTY_SOURCE
    }

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

    /**
     * Convenience constructor for new non-linked instance.
     *
     * @param managedObjectPoolSourceClassName Managed object pool source class name.
     */
    public WoofPoolModel(
      String managedObjectPoolSourceClassName
    ) {
        this.managedObjectPoolSourceClassName = managedObjectPoolSourceClassName;
    }

    /**
     * Convenience constructor for new non-linked instance allowing XY initialising.
     *
     * @param managedObjectPoolSourceClassName Managed object pool source class name.
     * @param x Horizontal location.
     * @param y Vertical location.
     */
    public WoofPoolModel(
      String managedObjectPoolSourceClassName
    , int x
    , int y
    ) {
        this.managedObjectPoolSourceClassName = managedObjectPoolSourceClassName;
        this.setX(x);
        this.setY(y);
    }

    /**
     * Convenience constructor.
     *
     * @param managedObjectPoolSourceClassName Managed object pool source class name.
     * @param propertySource Property source.
     */
    public WoofPoolModel(
      String managedObjectPoolSourceClassName
    , PropertySourceModel[] propertySource
    ) {
        this.managedObjectPoolSourceClassName = managedObjectPoolSourceClassName;
        if (propertySource != null) {
            for (PropertySourceModel model : propertySource) {
                this.propertySource.add(model);
            }
        }
    }

    /**
     * Convenience constructor allowing XY initialising.
     *
     * @param managedObjectPoolSourceClassName Managed object pool source class name.
     * @param propertySource Property source.
     * @param x Horizontal location.
     * @param y Vertical location.
     */
    public WoofPoolModel(
      String managedObjectPoolSourceClassName
    , PropertySourceModel[] propertySource
    , int x
    , int y
    ) {
        this.managedObjectPoolSourceClassName = managedObjectPoolSourceClassName;
        if (propertySource != null) {
            for (PropertySourceModel model : propertySource) {
                this.propertySource.add(model);
            }
        }
        this.setX(x);
        this.setY(y);
    }


    /**
     * Managed object pool source class name.
     */
    private String managedObjectPoolSourceClassName;

    /**
     * @return Managed object pool source class name.
     */
    public String getManagedObjectPoolSourceClassName() {
        return this.managedObjectPoolSourceClassName;
    }

    /**
     * @param managedObjectPoolSourceClassName Managed object pool source class name.
     */
    public void setManagedObjectPoolSourceClassName(String managedObjectPoolSourceClassName) {
        String oldValue = this.managedObjectPoolSourceClassName;
        this.managedObjectPoolSourceClassName = managedObjectPoolSourceClassName;
        this.changeField(oldValue, this.managedObjectPoolSourceClassName, WoofPoolEvent.CHANGE_MANAGED_OBJECT_POOL_SOURCE_CLASS_NAME);
    }


    /**
     * Property source.
     */
    private List propertySource = new LinkedList();

    /**
     * @return Property source.
     */
    public List getPropertySources() {
        return this.propertySource;
    }

    /**
     * @param propertySource Property source.
     */
    public void addPropertySource(PropertySourceModel propertySource) {
        this.addItemToList(propertySource, this.propertySource, WoofPoolEvent.ADD_PROPERTY_SOURCE);
    }

    /**
     * @param propertySource Property source.
     */
    public void removePropertySource(PropertySourceModel propertySource) {
        this.removeItemFromList(propertySource, this.propertySource, WoofPoolEvent.REMOVE_PROPERTY_SOURCE);
    }


    /**
     * 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