<commit_before>package ch.belsoft.hrassistant.job.dao;

import java.io.Serializable;
import java.util.List;

import nl.elstarit.cloudant.model.ConnectorResponse;
import ch.belsoft.hrassistant.dao.ICrudDAO;
import ch.belsoft.hrassistant.job.model.JobApplication;
import ch.belsoft.hrassistant.service.CloudantService;

public class JobApplicationDAO implements ICrudDAO<JobApplication, String>, Serializable {
    
    private static final long serialVersionUID = 1L;
    private static final String DESIGN_DOC = "jobapplication";
    private static final String VIEW_NAME = "jobapplications";
    private static final int VIEW_LIMIT = 1000;
    private CloudantService cloudantService = null;
    
    public JobApplicationDAO(){
        
    }
    
    
    public ConnectorResponse create(JobApplication t) {
        connectToService();
        return cloudantService.saveDocument(t);
    }
    
    public void delete(JobApplication t) {
        connectToService();
        cloudantService.removeDocument(t);
    }
    
    public JobApplication read(String id) {
        connectToService();
        return (JobApplication) cloudantService.findDocumentByID(JobApplication.class, id);
    }
    
    @SuppressWarnings("unchecked")
    public List<JobApplication> read() {<commit_msg>add comment to describe the limit parameter on the JobApplicationDAO<commit_after>package ch.belsoft.hrassistant.job.dao;

import java.io.Serializable;
import java.util.List;

import nl.elstarit.cloudant.model.ConnectorResponse;
import ch.belsoft.hrassistant.dao.ICrudDAO;
import ch.belsoft.hrassistant.job.model.JobApplication;
import ch.belsoft.hrassistant.service.CloudantService;

public class JobApplicationDAO implements ICrudDAO<JobApplication, String>, Serializable {
    
    private static final long serialVersionUID = 1L;
    private static final String DESIGN_DOC = "jobapplication";
    private static final String VIEW_NAME = "jobapplications";
    //Limit of the returned documents
    private static final int VIEW_LIMIT = 1000;
    private CloudantService cloudantService = null;
    
    public JobApplicationDAO(){
        
    }
    
    
    public ConnectorResponse create(JobApplication t) {
        connectToService();
        return cloudantService.saveDocument(t);
    }
    
    public void delete(JobApplication t) {
        connectToService();
        cloudantService.removeDocument(t);
    }
    
    public JobApplication read(String id) {
        connectToService();
        return (JobApplication) cloudantService.findDocumentByID(JobApplication.class, id);
    }
    
    @SuppressWarnings("unchecked")
    public List<JobApplication> read() {
{'fraction_non_alphanumeric': 0.07960946301164101, 'fraction_numerical': 0.003755163349605708, 'mean_word_length': 3.6818980667838312, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2769780', 'n_tokens_mistral': 745, 'n_tokens_neox': 746, 'n_words': 168}