Java 类ims.core.vo.DocumentsToBeDeletedVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void deleteFile(String fileToDelete, String boClassName, Integer documentId) 
{
    if(fileToDelete == null || fileToDelete.length() == 0)
        return;

    boolean success = false;

    File file = new File(fileToDelete);

    if(file.exists())
        success = file.delete();

    if (!success)
    {
        DocumentsToBeDeletedVo deleteDocument = new DocumentsToBeDeletedVo();
        deleteDocument.setFileName(fileToDelete);
        deleteDocument.setReferenceId(documentId);
        deleteDocument.setReferenceType(boClassName);
        deleteDocument.validate();

        domain.saveToBeDeteled(deleteDocument);
        System.out.println("File '" + fileToDelete + "' was not successfully deleted !");
    }
}
项目:AvoinApotti    文件:PatientDocumentSearchImpl.java   
public void saveToBeDeteled(DocumentsToBeDeletedVo document) 
{
    if(document == null)
        throw new CodingRuntimeException("Can not save a null DocumentsToBeDeletedVo.");

    if(!document.isValidated())
        throw new CodingRuntimeException("DocumentsToBeDeletedVo not validated");

    DomainFactory factory = getDomainFactory();
    DocumentsToBeDeleted doDocument = DocumentsToBeDeletedVoAssembler.extractDocumentsToBeDeleted(factory, document);

    try 
    {
        factory.save(doDocument);
    } 
    catch (StaleObjectException e) 
    {
        //should never happen
    }
}
项目:openMAXIMS    文件:Logic.java   
private void deleteFile(String fileToDelete, String boClassName, Integer documentId) 
{
    if(fileToDelete == null || fileToDelete.length() == 0)
        return;

    boolean success = false;

    File file = new File(fileToDelete);

    if(file.exists())
        success = file.delete();

    if (!success)
    {
        DocumentsToBeDeletedVo deleteDocument = new DocumentsToBeDeletedVo();
        deleteDocument.setFileName(fileToDelete);
        deleteDocument.setReferenceId(documentId);
        deleteDocument.setReferenceType(boClassName);
        deleteDocument.validate();

        domain.saveToBeDeteled(deleteDocument);
        System.out.println("File '" + fileToDelete + "' was not successfully deleted !");
    }
}
项目:openMAXIMS    文件:PatientDocumentSearchImpl.java   
public void saveToBeDeteled(DocumentsToBeDeletedVo document) 
{
    if(document == null)
        throw new CodingRuntimeException("Can not save a null DocumentsToBeDeletedVo.");

    if(!document.isValidated())
        throw new CodingRuntimeException("DocumentsToBeDeletedVo not validated");

    DomainFactory factory = getDomainFactory();
    DocumentsToBeDeleted doDocument = DocumentsToBeDeletedVoAssembler.extractDocumentsToBeDeleted(factory, document);

    try 
    {
        factory.save(doDocument);
    } 
    catch (StaleObjectException e) 
    {
        //should never happen
    }
}
项目:openMAXIMS    文件:Logic.java   
private void deleteFile(String fileToDelete, String boClassName, Integer documentId) 
{
    if(fileToDelete == null || fileToDelete.length() == 0)
        return;

    boolean success = false;

    File file = new File(fileToDelete);

    if(file.exists())
        success = file.delete();

    if (!success)
    {
        DocumentsToBeDeletedVo deleteDocument = new DocumentsToBeDeletedVo();
        deleteDocument.setFileName(fileToDelete);
        deleteDocument.setReferenceId(documentId);
        deleteDocument.setReferenceType(boClassName);
        deleteDocument.validate();

        domain.saveToBeDeteled(deleteDocument);
        System.out.println("File '" + fileToDelete + "' was not successfully deleted !");
    }
}
项目:openMAXIMS    文件:PatientDocumentSearchImpl.java   
public void saveToBeDeteled(DocumentsToBeDeletedVo document) 
{
    if(document == null)
        throw new CodingRuntimeException("Can not save a null DocumentsToBeDeletedVo.");

    if(!document.isValidated())
        throw new CodingRuntimeException("DocumentsToBeDeletedVo not validated");

    DomainFactory factory = getDomainFactory();
    DocumentsToBeDeleted doDocument = DocumentsToBeDeletedVoAssembler.extractDocumentsToBeDeleted(factory, document);

    try 
    {
        factory.save(doDocument);
    } 
    catch (StaleObjectException e) 
    {
        //should never happen
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void deleteFile(String fileToDelete, String boClassName, Integer documentId) 
{
    if(fileToDelete == null || fileToDelete.length() == 0)
        return;

    boolean success = false;

    File file = new File(fileToDelete);

    if(file.exists())
        success = file.delete();

    if (!success)
    {
        DocumentsToBeDeletedVo deleteDocument = new DocumentsToBeDeletedVo();
        deleteDocument.setFileName(fileToDelete);
        deleteDocument.setReferenceId(documentId);
        deleteDocument.setReferenceType(boClassName);
        deleteDocument.validate();

        domain.saveToBeDeteled(deleteDocument);
        System.out.println("File '" + fileToDelete + "' was not successfully deleted !");
    }
}
项目:openmaxims-linux    文件:PatientDocumentSearchImpl.java   
public void saveToBeDeteled(DocumentsToBeDeletedVo document) 
{
    if(document == null)
        throw new CodingRuntimeException("Can not save a null DocumentsToBeDeletedVo.");

    if(!document.isValidated())
        throw new CodingRuntimeException("DocumentsToBeDeletedVo not validated");

    DomainFactory factory = getDomainFactory();
    DocumentsToBeDeleted doDocument = DocumentsToBeDeletedVoAssembler.extractDocumentsToBeDeleted(factory, document);

    try 
    {
        factory.save(doDocument);
    } 
    catch (StaleObjectException e) 
    {
        //should never happen
    }
}
项目:AvoinApotti    文件:Logic.java   
private void deleteFile(String fileToDelete, ValueObject linkedObject)
{

    if (fileToDelete == null || fileToDelete.length() == 0)
        return;

    boolean success = false;

    File file = new File(fileToDelete);

    if (file.exists())
        success = file.delete();

    if (!success)
    {
        DocumentsToBeDeletedVo deleteDocument = new DocumentsToBeDeletedVo();
        deleteDocument.setFileName(fileToDelete);
        if (linkedObject != null)
        {
            deleteDocument.setReferenceId(linkedObject.getBoId());
            deleteDocument.setReferenceType(linkedObject.getBoClassName());
        }
        deleteDocument.validate();
        domain.saveToBeDeteled(deleteDocument);
        System.out.println("File '" + fileToDelete + "' was not successfully deleted !");
    }
}
项目:openMAXIMS    文件:Logic.java   
private void deleteFile(String fileToDelete, ValueObject linkedObject)
{

    if (fileToDelete == null || fileToDelete.length() == 0)
        return;

    boolean success = false;

    File file = new File(fileToDelete);

    if (file.exists())
        success = file.delete();

    if (!success)
    {
        DocumentsToBeDeletedVo deleteDocument = new DocumentsToBeDeletedVo();
        deleteDocument.setFileName(fileToDelete);
        if (linkedObject != null)
        {
            deleteDocument.setReferenceId(linkedObject.getBoId());
            deleteDocument.setReferenceType(linkedObject.getBoClassName());
        }
        deleteDocument.validate();
        domain.saveToBeDeteled(deleteDocument);
        System.out.println("File '" + fileToDelete + "' was not successfully deleted !");
    }
}
项目:openMAXIMS    文件:Logic.java   
private void deleteFile(String fileToDelete, ValueObject linkedObject)
{

    if (fileToDelete == null || fileToDelete.length() == 0)
        return;

    boolean success = false;

    File file = new File(fileToDelete);

    if (file.exists())
        success = file.delete();

    if (!success)
    {
        DocumentsToBeDeletedVo deleteDocument = new DocumentsToBeDeletedVo();
        deleteDocument.setFileName(fileToDelete);
        if (linkedObject != null)
        {
            deleteDocument.setReferenceId(linkedObject.getBoId());
            deleteDocument.setReferenceType(linkedObject.getBoClassName());
        }
        deleteDocument.validate();
        domain.saveToBeDeteled(deleteDocument);
        System.out.println("File '" + fileToDelete + "' was not successfully deleted !");
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void deleteFile(String fileToDelete, ValueObject linkedObject)
{

    if (fileToDelete == null || fileToDelete.length() == 0)
        return;

    boolean success = false;

    File file = new File(fileToDelete);

    if (file.exists())
        success = file.delete();

    if (!success)
    {
        DocumentsToBeDeletedVo deleteDocument = new DocumentsToBeDeletedVo();
        deleteDocument.setFileName(fileToDelete);
        if (linkedObject != null)
        {
            deleteDocument.setReferenceId(linkedObject.getBoId());
            deleteDocument.setReferenceType(linkedObject.getBoClassName());
        }
        deleteDocument.validate();
        domain.saveToBeDeteled(deleteDocument);
        System.out.println("File '" + fileToDelete + "' was not successfully deleted !");
    }
}
项目:AvoinApotti    文件:ClinicCorrespondenceListImpl.java   
public void saveToBeDeteled(DocumentsToBeDeletedVo document)
{
    PatientDocumentSearch domImpl = (PatientDocumentSearch) getDomainImpl(PatientDocumentSearchImpl.class);
    domImpl.saveToBeDeteled(document);

}
项目:openMAXIMS    文件:ClinicCorrespondenceListImpl.java   
public void saveToBeDeteled(DocumentsToBeDeletedVo document)
{
    PatientDocumentSearch domImpl = (PatientDocumentSearch) getDomainImpl(PatientDocumentSearchImpl.class);
    domImpl.saveToBeDeteled(document);

}
项目:openMAXIMS    文件:ClinicCorrespondenceListImpl.java   
public void saveToBeDeteled(DocumentsToBeDeletedVo document)
{
    PatientDocumentSearch domImpl = (PatientDocumentSearch) getDomainImpl(PatientDocumentSearchImpl.class);
    domImpl.saveToBeDeteled(document);

}
项目:openmaxims-linux    文件:ClinicCorrespondenceListImpl.java   
public void saveToBeDeteled(DocumentsToBeDeletedVo document)
{
    PatientDocumentSearch domImpl = (PatientDocumentSearch) getDomainImpl(PatientDocumentSearchImpl.class);
    domImpl.saveToBeDeteled(document);

}