package org.openur.module.domain.userstructure.orgunit.abstr;

import org.openur.module.domain.GraphNode;
import org.openur.module.domain.userstructure.orgunit.IOrgUnitMember;
import org.openur.module.domain.userstructure.person.abstr.AbstractPerson;

public abstract class AbstractOrgUnitMember
	extends GraphNode
	implements IOrgUnitMember
{
	private static final long serialVersionUID = -8299862057665830750L;

	// properties:
	private final AbstractPerson person;
	private final String orgUnitId;

	// constructors:
	protected AbstractOrgUnitMember(AbstractPerson person, String orgUnitId)
	{
		super();

		this.person = person;
		this.orgUnitId = orgUnitId;
	}

	// accessors:
	@Override
	public AbstractPerson getPerson()
	{
		return person;
	}

	@Override
	public String getOrgUnitId()
	{
		return orgUnitId;
	}

	// operations:
	@Override
	public boolean equals(Object obj)
	{
		return isEqual(obj);
	}
}

@@ -58,16 +58,59 @@
 str;%0D%0A%0D%0A
+import org.apache.commons.lang3.Validate;%0D%0A
 import o
@@ -663,16 +663,144 @@
 uper();%0D
+%0A%09%09%0D%0A%09%09Validate.notNull(person, %22person must not be null!%22);%0D%0A%09%09Validate.notEmpty(orgUnitId, %22org-unit-id must not be empty!%22);%0D
 %0A%0D%0A%09%09thi

validate constructor-args if null or empty.