Commit 4050e6eb authored by Anastasios Kalogeropoulos's avatar Anastasios Kalogeropoulos
Browse files

order ideas by create Date

parent c3e73492
Pipeline #8581 failed with stages
in 52 seconds
#Thu Dec 14 14:01:58 CET 2017
#Mon Oct 15 12:19:07 CEST 2018
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
derived.resources=.gradle,build
connection.java.home=null
connection.arguments=
eclipse.preferences.version=1
connection.java.home=null
connection.jvm.arguments=
eclipse.preferences.version=1
project.path=\:modules\:ideaService
connection.project.dir=../..
#Thu Dec 14 14:01:58 CET 2017
#Mon Oct 15 12:19:07 CEST 2018
connection.arguments=
containers=org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/
connection.jvm.arguments=
......@@ -8,5 +8,5 @@ natures=org.eclipse.jdt.core.javanature
eclipse.preferences.version=1
connection.java.home=null
derived.resources=.gradle,build
project.path=\:modules\:ideaService\:ideaService-api
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
project.path=\:modules\:ideaService\:ideaService-api
#Thu Dec 14 14:01:58 CET 2017
#Mon Oct 15 12:19:07 CEST 2018
connection.arguments=
containers=org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/
connection.jvm.arguments=
......@@ -8,5 +8,5 @@ natures=org.eclipse.jdt.core.javanature
eclipse.preferences.version=1
connection.java.home=null
derived.resources=.gradle,build
project.path=\:modules\:ideaService\:ideaService-service
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
project.path=\:modules\:ideaService\:ideaService-service
......@@ -37,6 +37,9 @@
<column name="statusByUserId" type="long" />
<column name="statusByUserName" type="String" />
<column name="statusDate" type="Date" />
<order by="desc">
<order-column name="createDate" order-by="desc"></order-column>
</order>
<finder name="LayoutRef" return-type="long">
<finder-column name="layoutRef"></finder-column>
......
......@@ -29,6 +29,7 @@ import com.liferay.portal.kernel.model.User;
import com.liferay.portal.kernel.model.impl.BaseModelImpl;
import com.liferay.portal.kernel.service.ServiceContext;
import com.liferay.portal.kernel.service.UserLocalServiceUtil;
import com.liferay.portal.kernel.util.DateUtil;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.PortalUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
......@@ -147,8 +148,8 @@ public class IdeasModelImpl extends BaseModelImpl<Ideas> implements IdeasModel {
public static final String TABLE_SQL_CREATE = "create table IDEA_Ideas (uuid_ VARCHAR(75) null,ideasId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,groupId LONG,title VARCHAR(75) null,description STRING null,shortdescription VARCHAR(100) null,reviewStatus VARCHAR(75) null,goal STRING null,tags STRING null,importance STRING null,targetAudience STRING null,solution STRING null,category LONG,latitude DOUBLE,longitude DOUBLE,videoUrl STRING null,published BOOLEAN,isVisibleOnMap BOOLEAN,rating TEXT null,projectRef LONG,videoFileRef LONG,pageUrl STRING null,layoutRef LONG,pitch STRING null,status INTEGER,statusByUserId LONG,statusByUserName VARCHAR(75) null,statusDate DATE null)";
public static final String TABLE_SQL_DROP = "drop table IDEA_Ideas";
public static final String ORDER_BY_JPQL = " ORDER BY ideas.ideasId ASC";
public static final String ORDER_BY_SQL = " ORDER BY IDEA_Ideas.ideasId ASC";
public static final String ORDER_BY_JPQL = " ORDER BY ideas.createDate DESC";
public static final String ORDER_BY_SQL = " ORDER BY IDEA_Ideas.createDate DESC";
public static final String DATA_SOURCE = "liferayDataSource";
public static final String SESSION_FACTORY = "liferaySessionFactory";
public static final String TX_MANAGER = "liferayTransactionManager";
......@@ -166,7 +167,7 @@ public class IdeasModelImpl extends BaseModelImpl<Ideas> implements IdeasModel {
public static final long LAYOUTREF_COLUMN_BITMASK = 4L;
public static final long STATUS_COLUMN_BITMASK = 8L;
public static final long UUID_COLUMN_BITMASK = 16L;
public static final long IDEASID_COLUMN_BITMASK = 32L;
public static final long CREATEDATE_COLUMN_BITMASK = 32L;
/**
* Converts the soap model instance into a normal model instance.
......@@ -628,6 +629,8 @@ public class IdeasModelImpl extends BaseModelImpl<Ideas> implements IdeasModel {
@Override
public void setCreateDate(Date createDate) {
_columnBitmask = -1L;
_createDate = createDate;
}
......@@ -1226,17 +1229,17 @@ public class IdeasModelImpl extends BaseModelImpl<Ideas> implements IdeasModel {
@Override
public int compareTo(Ideas ideas) {
long primaryKey = ideas.getPrimaryKey();
int value = 0;
if (getPrimaryKey() < primaryKey) {
return -1;
}
else if (getPrimaryKey() > primaryKey) {
return 1;
}
else {
return 0;
value = DateUtil.compareTo(getCreateDate(), ideas.getCreateDate());
value = value * -1;
if (value != 0) {
return value;
}
return 0;
}
@Override
......
......@@ -112,7 +112,8 @@ public class IdeasPersistenceImpl extends BasePersistenceImpl<Ideas>
IdeasModelImpl.FINDER_CACHE_ENABLED, IdeasImpl.class,
FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid",
new String[] { String.class.getName() },
IdeasModelImpl.UUID_COLUMN_BITMASK);
IdeasModelImpl.UUID_COLUMN_BITMASK |
IdeasModelImpl.CREATEDATE_COLUMN_BITMASK);
public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(IdeasModelImpl.ENTITY_CACHE_ENABLED,
IdeasModelImpl.FINDER_CACHE_ENABLED, Long.class,
FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid",
......@@ -906,7 +907,8 @@ public class IdeasPersistenceImpl extends BasePersistenceImpl<Ideas>
FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid_C",
new String[] { String.class.getName(), Long.class.getName() },
IdeasModelImpl.UUID_COLUMN_BITMASK |
IdeasModelImpl.COMPANYID_COLUMN_BITMASK);
IdeasModelImpl.COMPANYID_COLUMN_BITMASK |
IdeasModelImpl.CREATEDATE_COLUMN_BITMASK);
public static final FinderPath FINDER_PATH_COUNT_BY_UUID_C = new FinderPath(IdeasModelImpl.ENTITY_CACHE_ENABLED,
IdeasModelImpl.FINDER_CACHE_ENABLED, Long.class,
FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid_C",
......@@ -1697,7 +1699,8 @@ public class IdeasPersistenceImpl extends BasePersistenceImpl<Ideas>
IdeasModelImpl.FINDER_CACHE_ENABLED, IdeasImpl.class,
FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByStatus",
new String[] { Integer.class.getName() },
IdeasModelImpl.STATUS_COLUMN_BITMASK);
IdeasModelImpl.STATUS_COLUMN_BITMASK |
IdeasModelImpl.CREATEDATE_COLUMN_BITMASK);
public static final FinderPath FINDER_PATH_COUNT_BY_STATUS = new FinderPath(IdeasModelImpl.ENTITY_CACHE_ENABLED,
IdeasModelImpl.FINDER_CACHE_ENABLED, Long.class,
FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByStatus",
......@@ -2192,7 +2195,8 @@ public class IdeasPersistenceImpl extends BasePersistenceImpl<Ideas>
FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_S",
new String[] { Long.class.getName(), Integer.class.getName() },
IdeasModelImpl.GROUPID_COLUMN_BITMASK |
IdeasModelImpl.STATUS_COLUMN_BITMASK);
IdeasModelImpl.STATUS_COLUMN_BITMASK |
IdeasModelImpl.CREATEDATE_COLUMN_BITMASK);
public static final FinderPath FINDER_PATH_COUNT_BY_G_S = new FinderPath(IdeasModelImpl.ENTITY_CACHE_ENABLED,
IdeasModelImpl.FINDER_CACHE_ENABLED, Long.class,
FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_S",
......
......@@ -13,6 +13,6 @@
##
build.namespace=IDEA
build.number=270
build.date=1531401863419
build.number=286
build.date=1540210458481
build.auto.upgrade=true
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment