
io.lhysin.mybatis.ddd.spec.Criteria Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mybatis-ddd Show documentation
Show all versions of mybatis-ddd Show documentation
Mybatis Domain Driven Design
package io.lhysin.mybatis.ddd.spec;
import java.util.List;
import io.lhysin.mybatis.ddd.domain.Sort;
import io.lhysin.mybatis.ddd.domain.TypedCriteria;
/**
* The interface Criteria.
*
* @param the type parameter
*/
public interface Criteria {
/**
* Gets probe.
*
* @return the probe
*/
T getProbe();
/**
* Gets sort.
*
* @return the sort
*/
Sort getSort();
/**
* Create where clause list.
*
* @param column the column
* @return the list
*/
List createWhereClause(Column column);
/**
* Gets probe type.
*
* @return the probe type
*/
default Class> getProbeType() {
return getProbe().getClass();
}
/**
* Of criteria.
*
* @param probe type
* @param object probe
* @return {@link Criteria}
*/
static Criteria of(T object) {
return new TypedCriteria<>(object);
}
static Criteria of(T object, Sort sort) {
return new TypedCriteria<>(object, sort);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy