Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package com.dianping.cat.alarm;
import org.unidal.dal.jdbc.DataField;
import org.unidal.dal.jdbc.QueryDef;
import org.unidal.dal.jdbc.QueryType;
import org.unidal.dal.jdbc.Readset;
import org.unidal.dal.jdbc.Updateset;
import org.unidal.dal.jdbc.annotation.Attribute;
import org.unidal.dal.jdbc.annotation.Entity;
import org.unidal.dal.jdbc.annotation.Variable;
@Entity(logicalName = "alert", physicalName = "alert", alias = "al")
public class AlertEntity {
@Attribute(field = "id", nullable = false, primaryKey = true, autoIncrement = true)
public static final DataField ID = new DataField("id");
@Attribute(field = "domain", nullable = false)
public static final DataField DOMAIN = new DataField("domain");
@Attribute(field = "alert_time", nullable = false)
public static final DataField ALERT_TIME = new DataField("alert-time");
@Attribute(field = "category", nullable = false)
public static final DataField CATEGORY = new DataField("category");
@Attribute(field = "type", nullable = false)
public static final DataField TYPE = new DataField("type");
@Attribute(field = "content", nullable = false)
public static final DataField CONTENT = new DataField("content");
@Attribute(field = "metric", nullable = false)
public static final DataField METRIC = new DataField("metric");
@Attribute(field = "creation_date", nullable = false, insertExpr = "NOW()")
public static final DataField CREATION_DATE = new DataField("creation-date");
@Variable
public static final DataField KEY_ID = new DataField("key-id");
@Variable
public static final DataField START_TIME = new DataField("start-time");
@Variable
public static final DataField END_TIME = new DataField("end-time");
@Variable
public static final DataField CATEGORIES = new DataField("categories");
public static final Readset READSET_FULL = new Readset(ID, DOMAIN, ALERT_TIME, CATEGORY, TYPE, CONTENT, METRIC, CREATION_DATE);
public static final Updateset UPDATESET_FULL = new Updateset(ID, DOMAIN, ALERT_TIME, CATEGORY, TYPE, CONTENT, METRIC);
public static final QueryDef FIND_BY_PK = new QueryDef("findByPK", AlertEntity.class, QueryType.SELECT,
"SELECT FROM
WHERE = ${key-id}");
public static final QueryDef INSERT = new QueryDef("insert", AlertEntity.class, QueryType.INSERT,
"INSERT INTO
() VALUES()");
public static final QueryDef UPDATE_BY_PK = new QueryDef("updateByPK", AlertEntity.class, QueryType.UPDATE,
"UPDATE
SET WHERE = ${key-id}");
public static final QueryDef DELETE_BY_PK = new QueryDef("deleteByPK", AlertEntity.class, QueryType.DELETE,
"DELETE FROM
WHERE = ${key-id}");
public static final QueryDef QUERY_ALERTS_BY_TIME_DOMAIN = new QueryDef("queryAlertsByTimeDomain", AlertEntity.class, QueryType.SELECT,
"SELECT FROM
WHERE >= ${start-time} AND <= ${end-time} AND = ${domain} ORDER BY desc");
public static final QueryDef QUERY_ALERTS_BY_TIME_DOMAIN_CATEGORIES = new QueryDef("queryAlertsByTimeDomainCategories", AlertEntity.class, QueryType.SELECT,
"SELECT FROM
WHERE >= ${start-time} AND <= ${end-time} AND = ${domain} AND in ${categories} ORDER BY desc");
public static final QueryDef QUERY_ALERTS_BY_TIME_CATEGORY_DOMAIN = new QueryDef("queryAlertsByTimeCategoryDomain", AlertEntity.class, QueryType.SELECT,
"SELECT FROM
WHERE >= ${start-time} AND <= ${end-time} AND = ${category} AND = ${domain} ORDER BY asc");
public static final QueryDef QUERY_ALERTS_BY_TIME_CATEGORY = new QueryDef("queryAlertsByTimeCategory", AlertEntity.class, QueryType.SELECT,
"SELECT FROM
WHERE >= ${start-time} AND <= ${end-time} AND = ${category} ORDER BY asc");
}