Skip to content
Snippets Groups Projects
Commit acaecb84 authored by Jonas Blatt's avatar Jonas Blatt :ant:
Browse files

Add documentation for id value objects

parent 0f2c9da8
No related branches found
No related tags found
No related merge requests found
Showing
with 178 additions and 1 deletion
......@@ -3,8 +3,16 @@ package de.unikoblenz.fgbks.core.dmn.domain.common;
import de.unikoblenz.fgbks.base.value.AbstractSimpleValueObject;
import org.apache.commons.lang3.Validate;
/**
* Representing a row number of a dmn decision table.
*/
public class RowNumber extends AbstractSimpleValueObject<Long> {
/**
* Create a new RowNumber with the initial value.
*
* @param initialValue the row number
*/
public RowNumber(Long initialValue) {
super(initialValue);
}
......
......@@ -2,12 +2,26 @@ package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.base.value.AbstractStringValueObject;
/**
* An AbstractId is a String with a max 100 character length and should specify a unique element of
* a dmn table.
*/
public abstract class AbstractId extends AbstractStringValueObject {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public AbstractId(AbstractId initialValue) {
this(initialValue.getValue());
}
/**
* Create new object with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public AbstractId(String initialValue) {
super(initialValue);
}
......@@ -17,6 +31,11 @@ public abstract class AbstractId extends AbstractStringValueObject {
return 100;
}
/**
* Get a string, which contains the classname of the id and the value of the id.
*
* @return the String with the classname + ": + the value of the id
*/
@Override
public String toString() {
return this.getClassName() + ": " + this.getValue();
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnColumn;
/**
* A column id, representing the id of a {@link VDmnColumn}.
*/
public abstract class ColumnId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public ColumnId(AbstractId initialValue) {
super(initialValue);
}
/**
* Create new ColumnId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public ColumnId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnDecision;
/**
* A decision id, representing the id of a {@link VDmnDecision}.
*/
@JsonIdentifier("decisionId")
public class DecisionId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public DecisionId(DecisionId initialValue) {
this(initialValue.getValue());
}
/**
* Create new DecisionId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public DecisionId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnDecisionTable;
/**
* A decision table id, representing the id of a {@link VDmnDecisionTable}.
*/
@JsonIdentifier("decisionTableId")
public class DecisionTableId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public DecisionTableId(DecisionTableId initialValue) {
this(initialValue.getValue());
}
/**
* Create new DecisionTableId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public DecisionTableId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnDefinition;
/**
* A definition id, representing the id of a {@link VDmnDefinition}.
*/
@JsonIdentifier("definitionId")
public class DefinitionId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public DefinitionId(DefinitionId initialValue) {
this(initialValue.getValue());
}
/**
* Create new DefinitionId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public DefinitionId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnInputValue;
/**
* A input entry id, representing the id of the expression of a {@link VDmnInputValue}.
*/
@JsonIdentifier("inputEntryId")
public class InputEntryId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public InputEntryId(InputEntryId initialValue) {
this(initialValue.getValue());
}
/**
* Create new InputEntryId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public InputEntryId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnInputValue;
/**
* A input entry id, representing the id of a {@link VDmnInputValue}.
*/
@JsonIdentifier("inputExpressionId")
public class InputExpressionId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public InputExpressionId(InputExpressionId initialValue) {
this(initialValue.getValue());
}
/**
* Create new InputExpressionId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public InputExpressionId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnInputColumn;
/**
* A input id, representing the id of the a {@link VDmnInputColumn}.
*/
@JsonIdentifier("inputId")
public class InputId extends ColumnId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public InputId(InputId initialValue) {
this(initialValue.getValue());
}
/**
* Create new InputId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public InputId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnOutputColumn;
/**
* A output entry id, representing the id of the expression of a {@link VDmnOutputColumn}.
*/
@JsonIdentifier("outputEntryId")
public class OutputEntryId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public OutputEntryId(OutputEntryId initialValue) {
this(initialValue.getValue());
}
/**
* Create new OutputEntryId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public OutputEntryId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
@JsonIdentifier("OutputId")
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnOutputColumn;
/**
* A output id, representing the id of the a {@link VDmnOutputColumn}.
*/
@JsonIdentifier("outputId")
public class OutputId extends ColumnId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public OutputId(OutputId initialValue) {
super(initialValue.getValue());
}
/**
* Create new OutputId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public OutputId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnRule;
/**
* A rule id, representing the id of the a {@link VDmnRule}.
*/
@JsonIdentifier("ruleId")
public class RuleId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public RuleId(RuleId initialValue) {
this(initialValue.getValue());
}
/**
* Create new RuleId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public RuleId(String initialValue) {
super(initialValue);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment