Search in sources :

Example 1 with IActionLogRecordSearchBean

use of org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean in project entando-core by entando.

the class TestActionLogDAO method testActionLogSearch.

public void testActionLogSearch() {
    IActionLogRecordSearchBean bean = null;
    List<Integer> ids = this._actionLoggerDAO.getActionRecords(bean);
    this.compareIds(new Integer[] {}, ids);
    ActionLogRecord record1 = this._helper.createActionRecord(1, "username1", "actionName1", "namespace1", DateConverter.parseDate("01/01/2009 00:00", "dd/MM/yyyy HH:mm"), "params1");
    ActionLogRecord record2 = this._helper.createActionRecord(2, "username2", "actionName2", "namespace2", DateConverter.parseDate("01/01/2009 10:00", "dd/MM/yyyy HH:mm"), "params2");
    ActionLogRecord record3 = this._helper.createActionRecord(3, "username123", "actionName123", "namespace123", DateConverter.parseDate("02/01/2009 12:00", "dd/MM/yyyy HH:mm"), "params123");
    this._helper.addActionRecord(record1);
    this._helper.addActionRecord(record2);
    this._helper.addActionRecord(record3);
    ActionLogRecordSearchBean searchBean = this._helper.createSearchBean(null, "Name", null, null, DateConverter.parseDate("02/01/2009 10:01", "dd/MM/yyyy HH:mm"), DateConverter.parseDate("02/01/2009 14:01", "dd/MM/yyyy HH:mm"));
    ids = this._actionLoggerDAO.getActionRecords(searchBean);
    this.compareIds(new Integer[] { 3 }, ids);
}
Also used : ActionLogRecord(org.entando.entando.aps.system.services.actionlog.model.ActionLogRecord) IActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean) IActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean) ActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.ActionLogRecordSearchBean)

Example 2 with IActionLogRecordSearchBean

use of org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean in project entando-core by entando.

the class TestActionLogDAO method testGetActionRecords.

public void testGetActionRecords() {
    IActionLogRecordSearchBean bean = null;
    List<Integer> ids = this._actionLoggerDAO.getActionRecords(bean);
    // this.compareIds(new Integer[]{}, ids);
    ActionLogRecord record1 = this._helper.createActionRecord(1, "username1", "actionName1", "namespace1", DateConverter.parseDate("01/01/2009 00:00", "dd/MM/yyyy HH:mm"), "params1");
    ActionLogRecord record2 = this._helper.createActionRecord(2, "username2", "actionName2", "namespace2", DateConverter.parseDate("01/01/2009 10:00", "dd/MM/yyyy HH:mm"), "params2");
    ActionLogRecord record3 = this._helper.createActionRecord(3, "username123", "actionName123", "namespace123", DateConverter.parseDate("02/01/2009 12:00", "dd/MM/yyyy HH:mm"), "params123");
    this._helper.addActionRecord(record1);
    this._helper.addActionRecord(record2);
    this._helper.addActionRecord(record3);
    // 
    // ids = this._actionLoggerDAO.getActionRecords(bean);
    // this.compareIds(new Integer[]{1, 2, 3}, ids);
    ActionLogRecordSearchBean searchBean = this._helper.createSearchBean("name", "Name", "space", "arams", null, null);
    ids = this._actionLoggerDAO.getActionRecords(searchBean);
    this.compareIds(new Integer[] { 1, 2, 3 }, ids);
    searchBean = this._helper.createSearchBean("name", "Name", "space", "arams", DateConverter.parseDate("01/01/2009 10:01", "dd/MM/yyyy HH:mm"), null);
    ids = this._actionLoggerDAO.getActionRecords(searchBean);
    this.compareIds(new Integer[] { 3 }, ids);
    searchBean = this._helper.createSearchBean(null, null, null, null, null, DateConverter.parseDate("01/01/2009 10:01", "dd/MM/yyyy HH:mm"));
    ids = this._actionLoggerDAO.getActionRecords(searchBean);
    this.compareIds(new Integer[] { 1, 2 }, ids);
    searchBean = this._helper.createSearchBean(null, "Name", null, null, DateConverter.parseDate("01/01/2009 09:01", "dd/MM/yyyy HH:mm"), DateConverter.parseDate("01/01/2009 10:01", "dd/MM/yyyy HH:mm"));
    ids = this._actionLoggerDAO.getActionRecords(searchBean);
    this.compareIds(new Integer[] { 2 }, ids);
}
Also used : ActionLogRecord(org.entando.entando.aps.system.services.actionlog.model.ActionLogRecord) IActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean) IActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean) ActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.ActionLogRecordSearchBean)

Example 3 with IActionLogRecordSearchBean

use of org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean in project entando-core by entando.

the class TestSocialActivityStreamDAO method testActionLogSearch.

public void testActionLogSearch() {
    IActionLogRecordSearchBean bean = null;
    List<Integer> ids = this._actionLoggerDAO.getActionRecords(bean);
    this.compareIds(new Integer[] {}, ids);
    ActionLogRecord record1 = this._helper.createActionRecord(1, "username1", "actionName1", "namespace1", DateConverter.parseDate("01/01/2009 00:00", "dd/MM/yyyy HH:mm"), "params1");
    ActionLogRecord record2 = this._helper.createActionRecord(2, "username2", "actionName2", "namespace2", DateConverter.parseDate("01/01/2009 10:00", "dd/MM/yyyy HH:mm"), "params2");
    ActionLogRecord record3 = this._helper.createActionRecord(3, "username123", "actionName123", "namespace123", DateConverter.parseDate("02/01/2009 12:00", "dd/MM/yyyy HH:mm"), "params123");
    this._helper.addActionRecord(record1);
    this._helper.addActionRecord(record2);
    this._helper.addActionRecord(record3);
    ActionLogRecordSearchBean searchBean = this._helper.createSearchBean(null, "Name", null, null, DateConverter.parseDate("02/01/2009 10:01", "dd/MM/yyyy HH:mm"), DateConverter.parseDate("02/01/2009 14:01", "dd/MM/yyyy HH:mm"));
    ids = this._actionLoggerDAO.getActionRecords(searchBean);
    this.compareIds(new Integer[] { 3 }, ids);
}
Also used : ActionLogRecord(org.entando.entando.aps.system.services.actionlog.model.ActionLogRecord) IActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean) IActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean) ActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.ActionLogRecordSearchBean)

Example 4 with IActionLogRecordSearchBean

use of org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean in project entando-core by entando.

the class TestSocialActivityStreamDAO method testGetActionRecords.

public void testGetActionRecords() {
    IActionLogRecordSearchBean bean = null;
    List<Integer> ids = this._actionLoggerDAO.getActionRecords(bean);
    this.compareIds(new Integer[] {}, ids);
    ActionLogRecord record1 = this._helper.createActionRecord(1, "username1", "actionName1", "namespace1", DateConverter.parseDate("01/01/2009 00:00", "dd/MM/yyyy HH:mm"), "params1");
    ActionLogRecord record2 = this._helper.createActionRecord(2, "username2", "actionName2", "namespace2", DateConverter.parseDate("01/01/2009 10:00", "dd/MM/yyyy HH:mm"), "params2");
    ActionLogRecord record3 = this._helper.createActionRecord(3, "username123", "actionName123", "namespace123", DateConverter.parseDate("02/01/2009 12:00", "dd/MM/yyyy HH:mm"), "params123");
    this._helper.addActionRecord(record1);
    this._helper.addActionRecord(record2);
    this._helper.addActionRecord(record3);
    ids = this._actionLoggerDAO.getActionRecords(bean);
    this.compareIds(new Integer[] { 1, 2, 3 }, ids);
    ActionLogRecordSearchBean searchBean = this._helper.createSearchBean("name", "Name", "space", "arams", null, null);
    ids = this._actionLoggerDAO.getActionRecords(searchBean);
    this.compareIds(new Integer[] { 1, 2, 3 }, ids);
    searchBean = this._helper.createSearchBean("name", "Name", "space", "arams", DateConverter.parseDate("01/01/2009 10:01", "dd/MM/yyyy HH:mm"), null);
    ids = this._actionLoggerDAO.getActionRecords(searchBean);
    this.compareIds(new Integer[] { 3 }, ids);
    searchBean = this._helper.createSearchBean(null, null, null, null, null, DateConverter.parseDate("01/01/2009 10:01", "dd/MM/yyyy HH:mm"));
    ids = this._actionLoggerDAO.getActionRecords(searchBean);
    this.compareIds(new Integer[] { 1, 2 }, ids);
    searchBean = this._helper.createSearchBean(null, "Name", null, null, DateConverter.parseDate("01/01/2009 09:01", "dd/MM/yyyy HH:mm"), DateConverter.parseDate("01/01/2009 10:01", "dd/MM/yyyy HH:mm"));
    ids = this._actionLoggerDAO.getActionRecords(searchBean);
    this.compareIds(new Integer[] { 2 }, ids);
}
Also used : ActionLogRecord(org.entando.entando.aps.system.services.actionlog.model.ActionLogRecord) IActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean) IActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean) ActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.ActionLogRecordSearchBean)

Aggregations

ActionLogRecord (org.entando.entando.aps.system.services.actionlog.model.ActionLogRecord)4 ActionLogRecordSearchBean (org.entando.entando.aps.system.services.actionlog.model.ActionLogRecordSearchBean)4 IActionLogRecordSearchBean (org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean)4