All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.formkiq.server.dao.FormDao Maven / Gradle / Ivy

package com.formkiq.server.dao;

import com.formkiq.server.domain.Asset;
import com.formkiq.server.domain.ClientForm;
import com.formkiq.server.domain.User;
import com.formkiq.server.domain.type.ClientFormType;
import com.formkiq.server.domain.type.FormListDTO;
import com.formkiq.server.domain.type.SyncListDTO;

/**
 * FormDao methods.
 *
 */
public interface FormDao extends AbstractDao {

	/**
     * Deletes Form.
     * @param type {@link ClientFormType}
     * @param client {@link String}
     * @param uuid {@link String}
     */
    void deleteForm(ClientFormType type, String client, String uuid);

    /**
     * Find Asset.
     * @param assetId {@link String}
     * @return {@link Asset}
     */
    Asset findAsset(String assetId);

    /**
     * Find Asset Data.
     * @param assetId {@link String}
     * @return byte[]
     */
    byte[] findAssetData(String assetId);

    /**
     * Find Client Form.
     * @param clientId {@link String}
     * @param formId {@link String}
     * @return {@link ClientForm}
     */
    ClientForm findForm(String clientId, String formId);

    /**
     * Find Form.
     * @param user {@link User}
     * @param client {@link String}
     * @param form {@link String}
     * @return {@link ClientForm}
     */
    ClientForm findForm(User user, String client, String form);

    /**
     * Finds forms for client.
     * @param type {@link ClientFormType}
     * @param client {@link String}
     * @param token {@link String}
     * @return {@link FormListDTO}
     */
    FormListDTO findForms(ClientFormType type, String client,
            String token);

    /**
     * Find Forms with parent.
     * @param type {@link ClientFormType}
     * @param client {@link String}
     * @param form {@link String}
     * @param token {@link String}
     * @return {@link FormListDTO}
     */
    FormListDTO findForms(ClientFormType type, String client, String form,
            String token);

    /**
     * Return Form Sync List.
     * @param type {@link ClientFormType}
     * @param client {@link String}
     * @param nextToken int
     * @return {@link SyncListDTO}
     */
    SyncListDTO findFormSyncList(ClientFormType type, String client,
            String nextToken);

    /**
     * Whether the Form has children records.
     * @param client {@link String}
     * @param form {@link String}
     * @return boolean
     */
    boolean hasFormChildren(String client, String form);

    /**
     * Save Asset.
     * @param asset {@link Asset}
     * @return {@link Asset}
     */
    Asset saveAsset(Asset asset);

    /**
     * Saves Form.
     * @param form {@link ClientForm}
     * @return {@link ClientForm}
     */
    ClientForm saveForm(ClientForm form);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy