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

org.kie.kogito.examples.Rules471B42E068A21F8D5BEF529A54AE3B27 Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package org.kie.kogito.examples;

import java.util.*;
import org.drools.model.*;
import org.drools.modelcompiler.dsl.pattern.D;
import org.drools.model.Index.ConstraintType;
import java.time.*;
import java.time.format.*;
import java.text.*;
import org.drools.core.util.*;
import org.kie.kogito.examples.demo.Person;
import org.drools.model.Model;

public abstract class Rules471B42E068A21F8D5BEF529A54AE3B27 implements Model {

    public final static DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern(DateUtils.getDateFormatMask(),
                                                                                            Locale.ENGLISH);

    @Override
    public String getName() {
        return "org.kie.kogito.examples";
    }

    public static Date string_2_date(String s) {
        return GregorianCalendar.from(LocalDate.parse(s,
                                                      DATE_TIME_FORMATTER).atStartOfDay(ZoneId.systemDefault()))
                                .getTime();
    }

    @Override
    public List getEntryPoints() {
        return Arrays.asList(D.entryPoint("persons"));
    }

    @Override
    public List getGlobals() {
        return globals;
    }

    @Override
    public List getTypeMetaDatas() {
        return typeMetaDatas;
    }

    public static final org.drools.model.Global var_persons = D.globalOf(org.kie.kogito.rules.DataStore.class,
                                                                                                         "org.kie.kogito.examples",
                                                                                                         "persons");

    List globals = new ArrayList<>();

    List typeMetaDatas = Collections.emptyList();

    {
        globals.add(var_persons);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy