/*
 *  Copyright (c) 2004-2022, University of Oslo
 *  All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *  Redistributions of source code must retain the above copyright notice, this
 *  list of conditions and the following disclaimer.
 *
 *  Redistributions in binary form must reproduce the above copyright notice,
 *  this list of conditions and the following disclaimer in the documentation
 *  and/or other materials provided with the distribution.
 *  Neither the name of the HISP project nor the names of its contributors may
 *  be used to endorse or promote products derived from this software without
 *  specific prior written permission.
 *
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 *  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 *  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
 *  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 *  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package org.hisp.dhis.android.core.trackedentity;

import org.hisp.dhis.android.core.arch.db.tableinfos.TableInfo;
import org.hisp.dhis.android.core.arch.helpers.CollectionsHelper;
import org.hisp.dhis.android.core.common.CoreColumns;
import org.hisp.dhis.android.core.common.IdentifiableWithStyleColumns;

public final class TrackedEntityInstanceFilterTableInfo {

    private TrackedEntityInstanceFilterTableInfo() {
    }

    public static final TableInfo TABLE_INFO = new TableInfo() {

        @Override
        public String name() {
            return "TrackedEntityInstanceFilter";
        }

        @Override
        public CoreColumns columns() {
            return new Columns();
        }
    };

    public static class Columns extends IdentifiableWithStyleColumns {
        public final static String PROGRAM = "program";
        public final static String DESCRIPTION = "description";
        public final static String SORT_ORDER = "sortOrder";
        public final static String ENROLLMENT_STATUS = "enrollmentStatus";
        public final static String FOLLOW_UP = "followUp";
        public static final String PERIOD_FROM = "periodFrom";
        public static final String PERIOD_TO = "periodTo";

        @Override
        public String[] all() {
            return CollectionsHelper.appendInNewArray(super.all(),
                    PROGRAM,
                    DESCRIPTION,
                    SORT_ORDER,
                    ENROLLMENT_STATUS,
                    FOLLOW_UP,
                    PERIOD_FROM,
                    PERIOD_TO
            );
        }
    }
}
@@ -2689,53 +2689,603 @@
 lic 
+final 
 static 
-final String PERIOD_FROM = %22periodFrom
+String ORGANISATION_UNIT = %22organisationUnit%22;%0A        public final static String OU_MODE = %22ouMode%22;%0A        public final static String ASSIGNED_USER_MODE = %22assignedUserMode%22;%0A        public final static String ORDER = %22orderProperty%22;%0A        public final static String DISPLAY_COLUMN_ORDER = %22displayColumnOrder%22;%0A        public final static String EVENT_STATUS = %22eventStatus%22;%0A        public final static String EVENT_DATE = %22eventDate%22;%0A        public final static String LAST_UPDATED_DATE = %22lastUpdatedDate%22;%0A        public final static String PROGRAM_STAGE = %22programStage
 %22;%0A 
@@ -3302,49 +3302,252 @@
 lic 
+final 
 static 
-final String PERIOD_TO = %22periodTo
+String TRACKED_ENTITY_INSTANCES = %22trackedEntityInstances%22;%0A        public final static String ENROLLMENT_INCIDENT_DATE = %22enrollmentIncidentDate%22;%0A        public final static String ENROLLMENT_CREATED_DATE = %22enrollmentCreatedDate
 %22;%0A%0A
@@ -3851,50 +3851,440 @@
     
-PERIOD_FROM,%0A                    PERIOD_TO
+ORGANISATION_UNIT,%0A                    OU_MODE,%0A                    ASSIGNED_USER_MODE,%0A                    ORDER,%0A                    DISPLAY_COLUMN_ORDER,%0A                    EVENT_STATUS,%0A                    EVENT_DATE,%0A                    LAST_UPDATED_DATE,%0A                    PROGRAM_STAGE,%0A                    TRACKED_ENTITY_INSTANCES,%0A                    ENROLLMENT_INCIDENT_DATE,%0A                    ENROLLMENT_CREATED_DATE
 %0A   

Add TrackedEntityInstanceFilterTableInfo