Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1523 from cdowding-sl/feature/helix_values
Browse files Browse the repository at this point in the history
Removed Helix Data Types
  • Loading branch information
cdowding-sl authored Nov 8, 2019
2 parents ace874e + 47f4804 commit 761a29d
Show file tree
Hide file tree
Showing 121 changed files with 641 additions and 2,207 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.scottlogic.deg.common.commands;

import java.lang.reflect.Type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.scottlogic.deg.common.commands;

import org.apache.commons.lang3.tuple.ImmutablePair;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.scottlogic.deg.common.commands;

import com.scottlogic.deg.common.validators.ValidationResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.scottlogic.deg.common.commands;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.scottlogic.deg.common.profile;

import com.scottlogic.deg.common.ValidationException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.scottlogic.deg.common.profile;

public enum FieldType
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.scottlogic.deg.common.profile;

import com.fasterxml.jackson.annotation.JsonValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.scottlogic.deg.generator.profile.constraints.atomic;

import com.scottlogic.deg.common.profile.Field;
import com.scottlogic.deg.common.profile.HelixDateTime;
import com.scottlogic.deg.generator.fieldspecs.FieldSpec;
import com.scottlogic.deg.generator.fieldspecs.FieldSpecFactory;
import com.scottlogic.deg.generator.restrictions.linear.Limit;
Expand All @@ -31,9 +30,9 @@

public class AfterConstraint implements AtomicConstraint {
public final Field field;
public final HelixDateTime referenceValue;
public final OffsetDateTime referenceValue;

public AfterConstraint(Field field, HelixDateTime referenceValue) {
public AfterConstraint(Field field, OffsetDateTime referenceValue) {
this.field = field;
this.referenceValue = referenceValue;
}
Expand All @@ -50,7 +49,7 @@ public AtomicConstraint negate() {

@Override
public FieldSpec toFieldSpec() {
final LinearRestrictions<OffsetDateTime> dateTimeRestrictions = createDateTimeRestrictions(new Limit<>(referenceValue.getValue(), false), DATETIME_MAX_LIMIT);
final LinearRestrictions<OffsetDateTime> dateTimeRestrictions = createDateTimeRestrictions(new Limit<>(referenceValue, false), DATETIME_MAX_LIMIT);
return FieldSpecFactory.fromRestriction(dateTimeRestrictions);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.scottlogic.deg.generator.profile.constraints.atomic;

import com.scottlogic.deg.common.profile.Field;
import com.scottlogic.deg.common.profile.HelixDateTime;
import com.scottlogic.deg.generator.fieldspecs.FieldSpec;
import com.scottlogic.deg.generator.fieldspecs.FieldSpecFactory;
import com.scottlogic.deg.generator.restrictions.linear.Limit;
Expand All @@ -32,9 +31,9 @@

public class AfterOrAtConstraint implements AtomicConstraint {
public final Field field;
public final HelixDateTime referenceValue;
public final OffsetDateTime referenceValue;

public AfterOrAtConstraint(Field field, HelixDateTime referenceValue) {
public AfterOrAtConstraint(Field field, OffsetDateTime referenceValue) {
this.field = field;
this.referenceValue = referenceValue;
}
Expand All @@ -51,7 +50,7 @@ public AtomicConstraint negate() {

@Override
public FieldSpec toFieldSpec() {
final LinearRestrictions<OffsetDateTime> dateTimeRestrictions = createDateTimeRestrictions(new Limit<>(referenceValue.getValue(), true), DATETIME_MAX_LIMIT);
final LinearRestrictions<OffsetDateTime> dateTimeRestrictions = createDateTimeRestrictions(new Limit<>(referenceValue, true), DATETIME_MAX_LIMIT);
return FieldSpecFactory.fromRestriction(dateTimeRestrictions);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.scottlogic.deg.generator.profile.constraints.atomic;

import com.scottlogic.deg.common.profile.Field;
import com.scottlogic.deg.common.profile.HelixDateTime;
import com.scottlogic.deg.generator.fieldspecs.FieldSpec;
import com.scottlogic.deg.generator.fieldspecs.FieldSpecFactory;
import com.scottlogic.deg.generator.restrictions.linear.Limit;
Expand All @@ -31,9 +30,9 @@

public class BeforeConstraint implements AtomicConstraint {
public final Field field;
public final HelixDateTime referenceValue;
public final OffsetDateTime referenceValue;

public BeforeConstraint(Field field, HelixDateTime referenceValue) {
public BeforeConstraint(Field field, OffsetDateTime referenceValue) {
this.field = field;
this.referenceValue = referenceValue;
}
Expand All @@ -50,7 +49,7 @@ public AtomicConstraint negate() {

@Override
public FieldSpec toFieldSpec() {
final LinearRestrictions<OffsetDateTime> dateTimeRestrictions = createDateTimeRestrictions(DATETIME_MIN_LIMIT, new Limit<>(referenceValue.getValue(), false));
final LinearRestrictions<OffsetDateTime> dateTimeRestrictions = createDateTimeRestrictions(DATETIME_MIN_LIMIT, new Limit<>(referenceValue, false));
return FieldSpecFactory.fromRestriction(dateTimeRestrictions);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.scottlogic.deg.generator.profile.constraints.atomic;

import com.scottlogic.deg.common.profile.Field;
import com.scottlogic.deg.common.profile.HelixDateTime;
import com.scottlogic.deg.generator.fieldspecs.FieldSpec;
import com.scottlogic.deg.generator.fieldspecs.FieldSpecFactory;
import com.scottlogic.deg.generator.restrictions.linear.Limit;
Expand All @@ -31,9 +30,9 @@

public class BeforeOrAtConstraint implements AtomicConstraint {
public final Field field;
public final HelixDateTime referenceValue;
public final OffsetDateTime referenceValue;

public BeforeOrAtConstraint(Field field, HelixDateTime referenceValue) {
public BeforeOrAtConstraint(Field field, OffsetDateTime referenceValue) {
this.field = field;
this.referenceValue = referenceValue;
}
Expand All @@ -50,7 +49,7 @@ public AtomicConstraint negate() {

@Override
public FieldSpec toFieldSpec() {
final LinearRestrictions<OffsetDateTime> dateTimeRestrictions = createDateTimeRestrictions(DATETIME_MIN_LIMIT, new Limit<>(referenceValue.getValue(), true));
final LinearRestrictions<OffsetDateTime> dateTimeRestrictions = createDateTimeRestrictions(DATETIME_MIN_LIMIT, new Limit<>(referenceValue, true));
return FieldSpecFactory.fromRestriction(dateTimeRestrictions);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.scottlogic.deg.generator.profile.constraints.atomic;

import com.scottlogic.deg.common.profile.Field;
import com.scottlogic.deg.common.profile.HelixNumber;
import com.scottlogic.deg.generator.fieldspecs.FieldSpec;
import com.scottlogic.deg.generator.fieldspecs.FieldSpecFactory;
import com.scottlogic.deg.generator.restrictions.linear.Limit;
Expand All @@ -31,9 +30,9 @@

public class GreaterThanConstraint implements AtomicConstraint {
public final Field field;
public final HelixNumber referenceValue;
public final BigDecimal referenceValue;

public GreaterThanConstraint(Field field, HelixNumber referenceValue) {
public GreaterThanConstraint(Field field, BigDecimal referenceValue) {
this.referenceValue = referenceValue;
this.field = field;
}
Expand All @@ -50,7 +49,7 @@ public AtomicConstraint negate() {

@Override
public FieldSpec toFieldSpec() {
LinearRestrictions<BigDecimal> numericRestrictions = createNumericRestrictions(new Limit<>(referenceValue.getValue(), false), NUMERIC_MAX_LIMIT);
LinearRestrictions<BigDecimal> numericRestrictions = createNumericRestrictions(new Limit<>(referenceValue, false), NUMERIC_MAX_LIMIT);
return FieldSpecFactory.fromRestriction(numericRestrictions);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.scottlogic.deg.generator.profile.constraints.atomic;

import com.scottlogic.deg.common.profile.Field;
import com.scottlogic.deg.common.profile.HelixNumber;
import com.scottlogic.deg.generator.fieldspecs.FieldSpec;
import com.scottlogic.deg.generator.fieldspecs.FieldSpecFactory;
import com.scottlogic.deg.generator.restrictions.linear.Limit;
Expand All @@ -31,9 +30,9 @@

public class GreaterThanOrEqualToConstraint implements AtomicConstraint {
public final Field field;
public final HelixNumber referenceValue;
public final BigDecimal referenceValue;

public GreaterThanOrEqualToConstraint(Field field, HelixNumber referenceValue) {
public GreaterThanOrEqualToConstraint(Field field, BigDecimal referenceValue) {
this.referenceValue = referenceValue;
this.field = field;
}
Expand All @@ -50,7 +49,7 @@ public AtomicConstraint negate() {

@Override
public FieldSpec toFieldSpec() {
LinearRestrictions<BigDecimal> numericRestrictions = createNumericRestrictions(new Limit<>(referenceValue.getValue(), true), NUMERIC_MAX_LIMIT);
LinearRestrictions<BigDecimal> numericRestrictions = createNumericRestrictions(new Limit<>(referenceValue, true), NUMERIC_MAX_LIMIT);
return FieldSpecFactory.fromRestriction(numericRestrictions);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.scottlogic.deg.generator.profile.constraints.atomic;

import com.scottlogic.deg.common.profile.Field;
import com.scottlogic.deg.common.profile.HelixNumber;
import com.scottlogic.deg.generator.fieldspecs.FieldSpec;
import com.scottlogic.deg.generator.fieldspecs.FieldSpecFactory;
import com.scottlogic.deg.generator.restrictions.linear.Limit;
Expand All @@ -31,9 +30,9 @@

public class LessThanConstraint implements AtomicConstraint {
public final Field field;
public final HelixNumber referenceValue;
public final BigDecimal referenceValue;

public LessThanConstraint(Field field, HelixNumber referenceValue) {
public LessThanConstraint(Field field, BigDecimal referenceValue) {
this.referenceValue = referenceValue;
this.field = field;
}
Expand All @@ -50,7 +49,7 @@ public AtomicConstraint negate() {

@Override
public FieldSpec toFieldSpec() {
final LinearRestrictions<BigDecimal> numericRestrictions = createNumericRestrictions(NUMERIC_MIN_LIMIT, new Limit<>(referenceValue.getValue(), false));
final LinearRestrictions<BigDecimal> numericRestrictions = createNumericRestrictions(NUMERIC_MIN_LIMIT, new Limit<>(referenceValue, false));
return FieldSpecFactory.fromRestriction(numericRestrictions);
}

Expand Down
Loading

0 comments on commit 761a29d

Please sign in to comment.