From: Vásáry Dániel Date: Mon, 16 Sep 2019 08:48:25 +0000 (+0000) Subject: git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube... X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=86a65a6f0c34b4f297b27aaeb5a89403c266bb12;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C31527 --- diff --git a/server/-dependencies/pom.xml b/server/-dependencies/pom.xml index 20863b67..db9388a2 100644 --- a/server/-dependencies/pom.xml +++ b/server/-dependencies/pom.xml @@ -165,7 +165,7 @@ org.eclipse.platform:org.eclipse.equinox.ds:1.4.400 --> - + org.apache.aries.spifly:org.apache.aries.spifly.dynamic.bundle:1.0.8 diff --git a/server/hu.user.mediacube.indexer/generatorConfig.xml b/server/hu.user.mediacube.indexer/generatorConfig.xml index 306a381a..21065f80 100644 --- a/server/hu.user.mediacube.indexer/generatorConfig.xml +++ b/server/hu.user.mediacube.indexer/generatorConfig.xml @@ -1,13 +1,17 @@ - - - - - - - + + + + + +
+ + + + +
\ No newline at end of file diff --git a/server/hu.user.mediacube.indexer/indexer-run.launch b/server/hu.user.mediacube.indexer/indexer-run.launch index 02ca24f2..3d06338b 100644 --- a/server/hu.user.mediacube.indexer/indexer-run.launch +++ b/server/hu.user.mediacube.indexer/indexer-run.launch @@ -12,6 +12,8 @@ + + diff --git a/server/hu.user.mediacube.indexer/pom.xml b/server/hu.user.mediacube.indexer/pom.xml index fecdf5fd..9b256892 100644 --- a/server/hu.user.mediacube.indexer/pom.xml +++ b/server/hu.user.mediacube.indexer/pom.xml @@ -14,6 +14,7 @@ + true UTF-8 1.8 1.8 @@ -21,6 +22,22 @@ + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 2.1.0 + + + org.mybatis + mybatis + 3.5.2 + + + com.ibm + db2jcc4 + 4.19.26 + org.apache.lucene lucene-core diff --git a/server/hu.user.mediacube.indexer/src/main/java/hu/user/mediacube/indexer/db/Mediadescription.java b/server/hu.user.mediacube.indexer/src/main/java/hu/user/mediacube/indexer/db/Mediadescription.java new file mode 100644 index 00000000..53ebfcfe --- /dev/null +++ b/server/hu.user.mediacube.indexer/src/main/java/hu/user/mediacube/indexer/db/Mediadescription.java @@ -0,0 +1,168 @@ +package hu.user.mediacube.indexer.db; + +public class Mediadescription { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column DB2ADMIN.MEDIADESCRIPTION.ID + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column DB2ADMIN.MEDIADESCRIPTION.ITEMID + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + private Long itemid; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column DB2ADMIN.MEDIADESCRIPTION.MEDIAID + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + private Long mediaid; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column DB2ADMIN.MEDIADESCRIPTION.MEDIAFILEID + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + private Long mediafileid; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column DB2ADMIN.MEDIADESCRIPTION.DESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + private String description; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column DB2ADMIN.MEDIADESCRIPTION.ID + * + * @return the value of DB2ADMIN.MEDIADESCRIPTION.ID + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column DB2ADMIN.MEDIADESCRIPTION.ID + * + * @param id the value for DB2ADMIN.MEDIADESCRIPTION.ID + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column DB2ADMIN.MEDIADESCRIPTION.ITEMID + * + * @return the value of DB2ADMIN.MEDIADESCRIPTION.ITEMID + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public Long getItemid() { + return itemid; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column DB2ADMIN.MEDIADESCRIPTION.ITEMID + * + * @param itemid the value for DB2ADMIN.MEDIADESCRIPTION.ITEMID + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public void setItemid(Long itemid) { + this.itemid = itemid; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column DB2ADMIN.MEDIADESCRIPTION.MEDIAID + * + * @return the value of DB2ADMIN.MEDIADESCRIPTION.MEDIAID + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public Long getMediaid() { + return mediaid; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column DB2ADMIN.MEDIADESCRIPTION.MEDIAID + * + * @param mediaid the value for DB2ADMIN.MEDIADESCRIPTION.MEDIAID + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public void setMediaid(Long mediaid) { + this.mediaid = mediaid; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column DB2ADMIN.MEDIADESCRIPTION.MEDIAFILEID + * + * @return the value of DB2ADMIN.MEDIADESCRIPTION.MEDIAFILEID + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public Long getMediafileid() { + return mediafileid; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column DB2ADMIN.MEDIADESCRIPTION.MEDIAFILEID + * + * @param mediafileid the value for DB2ADMIN.MEDIADESCRIPTION.MEDIAFILEID + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public void setMediafileid(Long mediafileid) { + this.mediafileid = mediafileid; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column DB2ADMIN.MEDIADESCRIPTION.DESCRIPTION + * + * @return the value of DB2ADMIN.MEDIADESCRIPTION.DESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public String getDescription() { + return description; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column DB2ADMIN.MEDIADESCRIPTION.DESCRIPTION + * + * @param description the value for DB2ADMIN.MEDIADESCRIPTION.DESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public void setDescription(String description) { + this.description = description; + } +} \ No newline at end of file diff --git a/server/hu.user.mediacube.indexer/src/main/java/hu/user/mediacube/indexer/db/MediadescriptionExample.java b/server/hu.user.mediacube.indexer/src/main/java/hu/user/mediacube/indexer/db/MediadescriptionExample.java new file mode 100644 index 00000000..7a60af0b --- /dev/null +++ b/server/hu.user.mediacube.indexer/src/main/java/hu/user/mediacube/indexer/db/MediadescriptionExample.java @@ -0,0 +1,542 @@ +package hu.user.mediacube.indexer.db; + +import java.util.ArrayList; +import java.util.List; + +public class MediadescriptionExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public MediadescriptionExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("ID is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("ID is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("ID <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("ID not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andItemidIsNull() { + addCriterion("ITEMID is null"); + return (Criteria) this; + } + + public Criteria andItemidIsNotNull() { + addCriterion("ITEMID is not null"); + return (Criteria) this; + } + + public Criteria andItemidEqualTo(Long value) { + addCriterion("ITEMID =", value, "itemid"); + return (Criteria) this; + } + + public Criteria andItemidNotEqualTo(Long value) { + addCriterion("ITEMID <>", value, "itemid"); + return (Criteria) this; + } + + public Criteria andItemidGreaterThan(Long value) { + addCriterion("ITEMID >", value, "itemid"); + return (Criteria) this; + } + + public Criteria andItemidGreaterThanOrEqualTo(Long value) { + addCriterion("ITEMID >=", value, "itemid"); + return (Criteria) this; + } + + public Criteria andItemidLessThan(Long value) { + addCriterion("ITEMID <", value, "itemid"); + return (Criteria) this; + } + + public Criteria andItemidLessThanOrEqualTo(Long value) { + addCriterion("ITEMID <=", value, "itemid"); + return (Criteria) this; + } + + public Criteria andItemidIn(List values) { + addCriterion("ITEMID in", values, "itemid"); + return (Criteria) this; + } + + public Criteria andItemidNotIn(List values) { + addCriterion("ITEMID not in", values, "itemid"); + return (Criteria) this; + } + + public Criteria andItemidBetween(Long value1, Long value2) { + addCriterion("ITEMID between", value1, value2, "itemid"); + return (Criteria) this; + } + + public Criteria andItemidNotBetween(Long value1, Long value2) { + addCriterion("ITEMID not between", value1, value2, "itemid"); + return (Criteria) this; + } + + public Criteria andMediaidIsNull() { + addCriterion("MEDIAID is null"); + return (Criteria) this; + } + + public Criteria andMediaidIsNotNull() { + addCriterion("MEDIAID is not null"); + return (Criteria) this; + } + + public Criteria andMediaidEqualTo(Long value) { + addCriterion("MEDIAID =", value, "mediaid"); + return (Criteria) this; + } + + public Criteria andMediaidNotEqualTo(Long value) { + addCriterion("MEDIAID <>", value, "mediaid"); + return (Criteria) this; + } + + public Criteria andMediaidGreaterThan(Long value) { + addCriterion("MEDIAID >", value, "mediaid"); + return (Criteria) this; + } + + public Criteria andMediaidGreaterThanOrEqualTo(Long value) { + addCriterion("MEDIAID >=", value, "mediaid"); + return (Criteria) this; + } + + public Criteria andMediaidLessThan(Long value) { + addCriterion("MEDIAID <", value, "mediaid"); + return (Criteria) this; + } + + public Criteria andMediaidLessThanOrEqualTo(Long value) { + addCriterion("MEDIAID <=", value, "mediaid"); + return (Criteria) this; + } + + public Criteria andMediaidIn(List values) { + addCriterion("MEDIAID in", values, "mediaid"); + return (Criteria) this; + } + + public Criteria andMediaidNotIn(List values) { + addCriterion("MEDIAID not in", values, "mediaid"); + return (Criteria) this; + } + + public Criteria andMediaidBetween(Long value1, Long value2) { + addCriterion("MEDIAID between", value1, value2, "mediaid"); + return (Criteria) this; + } + + public Criteria andMediaidNotBetween(Long value1, Long value2) { + addCriterion("MEDIAID not between", value1, value2, "mediaid"); + return (Criteria) this; + } + + public Criteria andMediafileidIsNull() { + addCriterion("MEDIAFILEID is null"); + return (Criteria) this; + } + + public Criteria andMediafileidIsNotNull() { + addCriterion("MEDIAFILEID is not null"); + return (Criteria) this; + } + + public Criteria andMediafileidEqualTo(Long value) { + addCriterion("MEDIAFILEID =", value, "mediafileid"); + return (Criteria) this; + } + + public Criteria andMediafileidNotEqualTo(Long value) { + addCriterion("MEDIAFILEID <>", value, "mediafileid"); + return (Criteria) this; + } + + public Criteria andMediafileidGreaterThan(Long value) { + addCriterion("MEDIAFILEID >", value, "mediafileid"); + return (Criteria) this; + } + + public Criteria andMediafileidGreaterThanOrEqualTo(Long value) { + addCriterion("MEDIAFILEID >=", value, "mediafileid"); + return (Criteria) this; + } + + public Criteria andMediafileidLessThan(Long value) { + addCriterion("MEDIAFILEID <", value, "mediafileid"); + return (Criteria) this; + } + + public Criteria andMediafileidLessThanOrEqualTo(Long value) { + addCriterion("MEDIAFILEID <=", value, "mediafileid"); + return (Criteria) this; + } + + public Criteria andMediafileidIn(List values) { + addCriterion("MEDIAFILEID in", values, "mediafileid"); + return (Criteria) this; + } + + public Criteria andMediafileidNotIn(List values) { + addCriterion("MEDIAFILEID not in", values, "mediafileid"); + return (Criteria) this; + } + + public Criteria andMediafileidBetween(Long value1, Long value2) { + addCriterion("MEDIAFILEID between", value1, value2, "mediafileid"); + return (Criteria) this; + } + + public Criteria andMediafileidNotBetween(Long value1, Long value2) { + addCriterion("MEDIAFILEID not between", value1, value2, "mediafileid"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated do_not_delete_during_merge Fri Sep 13 15:49:42 CEST 2019 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/server/hu.user.mediacube.indexer/src/main/java/hu/user/mediacube/indexer/db/MediadescriptionMapper.java b/server/hu.user.mediacube.indexer/src/main/java/hu/user/mediacube/indexer/db/MediadescriptionMapper.java new file mode 100644 index 00000000..cc7fd694 --- /dev/null +++ b/server/hu.user.mediacube.indexer/src/main/java/hu/user/mediacube/indexer/db/MediadescriptionMapper.java @@ -0,0 +1,150 @@ +package hu.user.mediacube.indexer.db; + +import java.util.List; + +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Result; +import org.apache.ibatis.annotations.Results; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.Update; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; + +@Mapper +public interface MediadescriptionMapper { + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + @SelectProvider(type = MediadescriptionSqlProvider.class, method = "countByExample") + long countByExample(MediadescriptionExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + @DeleteProvider(type = MediadescriptionSqlProvider.class, method = "deleteByExample") + int deleteByExample(MediadescriptionExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + @Delete({ "delete from DB2ADMIN.MEDIADESCRIPTION", "where ID = #{id,jdbcType=BIGINT}" }) + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + @Insert({ "insert into DB2ADMIN.MEDIADESCRIPTION (ID, ITEMID, ", "MEDIAID, MEDIAFILEID, ", "DESCRIPTION)", + "values (#{id,jdbcType=BIGINT}, #{itemid,jdbcType=BIGINT}, ", "#{mediaid,jdbcType=BIGINT}, #{mediafileid,jdbcType=BIGINT}, ", + "#{description,jdbcType=CLOB})" }) + int insert(Mediadescription record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + @InsertProvider(type = MediadescriptionSqlProvider.class, method = "insertSelective") + int insertSelective(Mediadescription record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + @SelectProvider(type = MediadescriptionSqlProvider.class, method = "selectByExample") + @Results({ @Result(column = "ID", property = "id", jdbcType = JdbcType.BIGINT, id = true), + @Result(column = "ITEMID", property = "itemid", jdbcType = JdbcType.BIGINT), + @Result(column = "MEDIAID", property = "mediaid", jdbcType = JdbcType.BIGINT), + @Result(column = "MEDIAFILEID", property = "mediafileid", jdbcType = JdbcType.BIGINT) }) + List selectByExample(MediadescriptionExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + @SelectProvider(type = MediadescriptionSqlProvider.class, method = "selectByExampleWithBLOBs") + @Results({ @Result(column = "ID", property = "id", jdbcType = JdbcType.BIGINT, id = true), + @Result(column = "ITEMID", property = "itemid", jdbcType = JdbcType.BIGINT), + @Result(column = "MEDIAID", property = "mediaid", jdbcType = JdbcType.BIGINT), + @Result(column = "MEDIAFILEID", property = "mediafileid", jdbcType = JdbcType.BIGINT), + @Result(column = "DESCRIPTION", property = "description", jdbcType = JdbcType.CLOB) }) + List selectByExampleWithBLOBs(MediadescriptionExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + @Select({ "select", "ID, ITEMID, MEDIAID, MEDIAFILEID, DESCRIPTION", "from DB2ADMIN.MEDIADESCRIPTION", "where ID = #{id,jdbcType=BIGINT}" }) + @Results({ @Result(column = "ID", property = "id", jdbcType = JdbcType.BIGINT, id = true), + @Result(column = "ITEMID", property = "itemid", jdbcType = JdbcType.BIGINT), + @Result(column = "MEDIAID", property = "mediaid", jdbcType = JdbcType.BIGINT), + @Result(column = "MEDIAFILEID", property = "mediafileid", jdbcType = JdbcType.BIGINT), + @Result(column = "DESCRIPTION", property = "description", jdbcType = JdbcType.CLOB) }) + Mediadescription selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + @UpdateProvider(type = MediadescriptionSqlProvider.class, method = "updateByExample") + int updateByExample(@Param("record") Mediadescription record, @Param("example") MediadescriptionExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + @UpdateProvider(type = MediadescriptionSqlProvider.class, method = "updateByExampleSelective") + int updateByExampleSelective(@Param("record") Mediadescription record, @Param("example") MediadescriptionExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + @UpdateProvider(type = MediadescriptionSqlProvider.class, method = "updateByExampleWithBLOBs") + int updateByExampleWithBLOBs(@Param("record") Mediadescription record, @Param("example") MediadescriptionExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + @Update({ "update DB2ADMIN.MEDIADESCRIPTION", "set ITEMID = #{itemid,jdbcType=BIGINT},", "MEDIAID = #{mediaid,jdbcType=BIGINT},", + "MEDIAFILEID = #{mediafileid,jdbcType=BIGINT}", "where ID = #{id,jdbcType=BIGINT}" }) + int updateByPrimaryKey(Mediadescription record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + @UpdateProvider(type = MediadescriptionSqlProvider.class, method = "updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(Mediadescription record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + @Update({ "update DB2ADMIN.MEDIADESCRIPTION", "set ITEMID = #{itemid,jdbcType=BIGINT},", "MEDIAID = #{mediaid,jdbcType=BIGINT},", + "MEDIAFILEID = #{mediafileid,jdbcType=BIGINT},", "DESCRIPTION = #{description,jdbcType=CLOB}", "where ID = #{id,jdbcType=BIGINT}" }) + int updateByPrimaryKeyWithBLOBs(Mediadescription record); +} \ No newline at end of file diff --git a/server/hu.user.mediacube.indexer/src/main/java/hu/user/mediacube/indexer/db/MediadescriptionSqlProvider.java b/server/hu.user.mediacube.indexer/src/main/java/hu/user/mediacube/indexer/db/MediadescriptionSqlProvider.java new file mode 100644 index 00000000..712a7d22 --- /dev/null +++ b/server/hu.user.mediacube.indexer/src/main/java/hu/user/mediacube/indexer/db/MediadescriptionSqlProvider.java @@ -0,0 +1,325 @@ +package hu.user.mediacube.indexer.db; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.jdbc.SQL; + +import hu.user.mediacube.indexer.db.MediadescriptionExample.Criteria; +import hu.user.mediacube.indexer.db.MediadescriptionExample.Criterion; + +public class MediadescriptionSqlProvider { + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + protected void applyWhere(SQL sql, MediadescriptionExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, + criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public String countByExample(MediadescriptionExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("DB2ADMIN.MEDIADESCRIPTION"); + applyWhere(sql, example, false); + return sql.toString(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public String deleteByExample(MediadescriptionExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("DB2ADMIN.MEDIADESCRIPTION"); + applyWhere(sql, example, false); + return sql.toString(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public String insertSelective(Mediadescription record) { + SQL sql = new SQL(); + sql.INSERT_INTO("DB2ADMIN.MEDIADESCRIPTION"); + + if (record.getId() != null) { + sql.VALUES("ID", "#{id,jdbcType=BIGINT}"); + } + + if (record.getItemid() != null) { + sql.VALUES("ITEMID", "#{itemid,jdbcType=BIGINT}"); + } + + if (record.getMediaid() != null) { + sql.VALUES("MEDIAID", "#{mediaid,jdbcType=BIGINT}"); + } + + if (record.getMediafileid() != null) { + sql.VALUES("MEDIAFILEID", "#{mediafileid,jdbcType=BIGINT}"); + } + + if (record.getDescription() != null) { + sql.VALUES("DESCRIPTION", "#{description,jdbcType=CLOB}"); + } + + return sql.toString(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public String selectByExample(MediadescriptionExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("ID"); + } else { + sql.SELECT("ID"); + } + sql.SELECT("ITEMID"); + sql.SELECT("MEDIAID"); + sql.SELECT("MEDIAFILEID"); + sql.FROM("DB2ADMIN.MEDIADESCRIPTION"); + applyWhere(sql, example, false); + + sql.FETCH_FIRST_ROWS_ONLY(1); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public String selectByExampleWithBLOBs(MediadescriptionExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("ID"); + } else { + sql.SELECT("ID"); + } + sql.SELECT("ITEMID"); + sql.SELECT("MEDIAID"); + sql.SELECT("MEDIAFILEID"); + sql.SELECT("DESCRIPTION"); + sql.FROM("DB2ADMIN.MEDIADESCRIPTION"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("DB2ADMIN.MEDIADESCRIPTION"); + + sql.SET("ID = #{record.id,jdbcType=BIGINT}"); + sql.SET("ITEMID = #{record.itemid,jdbcType=BIGINT}"); + sql.SET("MEDIAID = #{record.mediaid,jdbcType=BIGINT}"); + sql.SET("MEDIAFILEID = #{record.mediafileid,jdbcType=BIGINT}"); + + MediadescriptionExample example = (MediadescriptionExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public String updateByExampleSelective(Map parameter) { + Mediadescription record = (Mediadescription) parameter.get("record"); + MediadescriptionExample example = (MediadescriptionExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("DB2ADMIN.MEDIADESCRIPTION"); + + if (record.getId() != null) { + sql.SET("ID = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getItemid() != null) { + sql.SET("ITEMID = #{record.itemid,jdbcType=BIGINT}"); + } + + if (record.getMediaid() != null) { + sql.SET("MEDIAID = #{record.mediaid,jdbcType=BIGINT}"); + } + + if (record.getMediafileid() != null) { + sql.SET("MEDIAFILEID = #{record.mediafileid,jdbcType=BIGINT}"); + } + + if (record.getDescription() != null) { + sql.SET("DESCRIPTION = #{record.description,jdbcType=CLOB}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public String updateByExampleWithBLOBs(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("DB2ADMIN.MEDIADESCRIPTION"); + + sql.SET("ID = #{record.id,jdbcType=BIGINT}"); + sql.SET("ITEMID = #{record.itemid,jdbcType=BIGINT}"); + sql.SET("MEDIAID = #{record.mediaid,jdbcType=BIGINT}"); + sql.SET("MEDIAFILEID = #{record.mediafileid,jdbcType=BIGINT}"); + sql.SET("DESCRIPTION = #{record.description,jdbcType=CLOB}"); + + MediadescriptionExample example = (MediadescriptionExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table DB2ADMIN.MEDIADESCRIPTION + * + * @mbg.generated Fri Sep 13 15:49:42 CEST 2019 + */ + public String updateByPrimaryKeySelective(Mediadescription record) { + SQL sql = new SQL(); + sql.UPDATE("DB2ADMIN.MEDIADESCRIPTION"); + + if (record.getItemid() != null) { + sql.SET("ITEMID = #{itemid,jdbcType=BIGINT}"); + } + + if (record.getMediaid() != null) { + sql.SET("MEDIAID = #{mediaid,jdbcType=BIGINT}"); + } + + if (record.getMediafileid() != null) { + sql.SET("MEDIAFILEID = #{mediafileid,jdbcType=BIGINT}"); + } + + if (record.getDescription() != null) { + sql.SET("DESCRIPTION = #{description,jdbcType=CLOB}"); + } + + sql.WHERE("ID = #{id,jdbcType=BIGINT}"); + + return sql.toString(); + } +} \ No newline at end of file diff --git a/server/hu.user.mediacube.indexer/src/main/resources/application.properties b/server/hu.user.mediacube.indexer/src/main/resources/application.properties new file mode 100644 index 00000000..f156d170 --- /dev/null +++ b/server/hu.user.mediacube.indexer/src/main/resources/application.properties @@ -0,0 +1,5 @@ +#mybatis.config-location=classpath*:mybatis.xml +spring.datasource.driver-class-name=com.ibm.db2.jcc.DB2Driver +spring.datasource.url=jdbc:db2://10.10.1.27:50000/mc:retrieveMessagesFromServerOnGetMessage=true; +spring.datasource.username=db2admin +spring.datasource.password=password \ No newline at end of file diff --git a/server/hu.user.mediacube.indexer/src/main/resources/mybatis.xml b/server/hu.user.mediacube.indexer/src/main/resources/mybatis.xml new file mode 100644 index 00000000..e72703b2 --- /dev/null +++ b/server/hu.user.mediacube.indexer/src/main/resources/mybatis.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/server/hu.user.mediacube.indexer/src/test/java/application.properties b/server/hu.user.mediacube.indexer/src/test/java/application.properties new file mode 100644 index 00000000..145e25ed --- /dev/null +++ b/server/hu.user.mediacube.indexer/src/test/java/application.properties @@ -0,0 +1 @@ +mybatis.config-location=mapper.xml \ No newline at end of file diff --git a/server/hu.user.mediacube.indexer/src/test/java/hu/user/mediacube/indexer/TestDB2.java b/server/hu.user.mediacube.indexer/src/test/java/hu/user/mediacube/indexer/TestDB2.java new file mode 100644 index 00000000..77b3d307 --- /dev/null +++ b/server/hu.user.mediacube.indexer/src/test/java/hu/user/mediacube/indexer/TestDB2.java @@ -0,0 +1,25 @@ +package hu.user.mediacube.indexer; + +import static org.junit.Assert.assertNull; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; + +import hu.user.mediacube.indexer.db.MediadescriptionMapper; + +@RunWith(SpringRunner.class) +@ContextConfiguration(classes = IndexerApplication.class) + +public class TestDB2 { + + @Autowired + private MediadescriptionMapper mapper; + + @Test + public void whenPropertiesLoadedViaJsonPropertySource_thenLoadFlatValues() { + assertNull(mapper); + } +} diff --git a/server/hu.user.mediacube.indexer/src/test/java/hu/user/mediacube/indexer/TestLucene.java b/server/hu.user.mediacube.indexer/src/test/java/hu/user/mediacube/indexer/TestLucene.java index ac64d932..8cf723fa 100644 --- a/server/hu.user.mediacube.indexer/src/test/java/hu/user/mediacube/indexer/TestLucene.java +++ b/server/hu.user.mediacube.indexer/src/test/java/hu/user/mediacube/indexer/TestLucene.java @@ -62,7 +62,7 @@ public class TestLucene { IndexWriterConfig indexWriterConfig = new IndexWriterConfig(analyzer); IndexWriter indexWritter = new IndexWriter(directoryIndex, indexWriterConfig); - //createDocument(indexWritter); + createDocument(indexWritter); List search = search("body", "dániel"); System.out.println(search.size()); diff --git a/server/hu.user.mediacube.indexer/src/test/java/mapper.xml b/server/hu.user.mediacube.indexer/src/test/java/mapper.xml new file mode 100644 index 00000000..aa2bee78 --- /dev/null +++ b/server/hu.user.mediacube.indexer/src/test/java/mapper.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/server/user.jobengine.osgi.server/build.properties b/server/user.jobengine.osgi.server/build.properties index 32f89993..547e4702 100644 --- a/server/user.jobengine.osgi.server/build.properties +++ b/server/user.jobengine.osgi.server/build.properties @@ -7,9 +7,9 @@ bin.includes = META-INF/,\ OSGI-INF/,\ src/,\ WEB-INF/,\ - index.jsp,\ css/,\ img/,\ js/,\ - pages/ -src.includes = resources/ \ No newline at end of file + pages/,\ + index.zul +src.includes = resources/