C# Class Microsoft.Research.DataOnboarding.DataAccessService.Providers.EntityFramework.FileRepository

Implements file IFileRepository leveraging entity framework
Inheritance: RepositoryBase, IFileRepository
Show file Open project: CDLUC3/dataup2 Class Usage Examples

Public Methods

Method Description
AddFile ( Microsoft.Research.DataOnboarding.DomainModel.File newFile ) : Microsoft.Research.DataOnboarding.DomainModel.File

Method to add file information to database

DeleteFile ( int fileId, string status, bool isFileData = false, bool isHardDelete = true ) : bool

Method to delete the file metadata fields data for the mentioned file id.

FileRepository ( IUnitOfWork dataContext ) : Microsoft.Research.DataOnboarding.DomainModel

Initializes a new instance of the FileRepository class.

GetFiles ( bool>.Func predicate ) : IEnumerable

Method to get all the available files for the specified user.

GetFilesByRepository ( int repositoryId ) : IEnumerable

Method to get all the files for the mentioned repository.

GetItem ( int userId, int fileId ) : Microsoft.Research.DataOnboarding.DomainModel.File

Method to get file item based on the user id and file id

GetItem ( int userId, string fileName ) : Microsoft.Research.DataOnboarding.DomainModel.File

Method to get file item based on the user id and filename

GetItem ( string nameIdentifier, int fileId ) : Microsoft.Research.DataOnboarding.DomainModel.File

Method to get file by name identifier and file id.

RetrieveFileColumnTypes ( ) : List

Method to Retrieve Column Types

RetrieveFileColumnUnits ( ) : List

Method to Retrieve Column Units

RetrieveMetaDataTypes ( ) : List

Method to get meta data types

Private Methods

Method Description
UpdateColumnLevelMetadata ( Microsoft.Research.DataOnboarding.DomainModel.File modifiedFile ) : void

Method to update column level metadata.

UpdateFile ( Microsoft.Research.DataOnboarding.DomainModel.File modifiedFile ) : Microsoft.Research.DataOnboarding.DomainModel.File
UpdateFileLevelMetadata ( Microsoft.Research.DataOnboarding.DomainModel.File modifiedFile ) : void

Method to update file level metadata.

Method Details

AddFile() public method

Method to add file information to database
public AddFile ( Microsoft.Research.DataOnboarding.DomainModel.File newFile ) : Microsoft.Research.DataOnboarding.DomainModel.File
newFile Microsoft.Research.DataOnboarding.DomainModel.File File object
return Microsoft.Research.DataOnboarding.DomainModel.File

DeleteFile() public method

Method to delete the file metadata fields data for the mentioned file id.
public DeleteFile ( int fileId, string status, bool isFileData = false, bool isHardDelete = true ) : bool
fileId int File id.
status string
isFileData bool Deleting only file related data.
isHardDelete bool
return bool

FileRepository() public method

Initializes a new instance of the FileRepository class.
public FileRepository ( IUnitOfWork dataContext ) : Microsoft.Research.DataOnboarding.DomainModel
dataContext IUnitOfWork IUnitOfWork context
return Microsoft.Research.DataOnboarding.DomainModel

GetFiles() public method

Method to get all the available files for the specified user.
public GetFiles ( bool>.Func predicate ) : IEnumerable
predicate bool>.Func Function that is used to filter records
return IEnumerable

GetFilesByRepository() public method

Method to get all the files for the mentioned repository.
public GetFilesByRepository ( int repositoryId ) : IEnumerable
repositoryId int Repository id.
return IEnumerable

GetItem() public method

Method to get file item based on the user id and file id
public GetItem ( int userId, int fileId ) : Microsoft.Research.DataOnboarding.DomainModel.File
userId int user Id
fileId int file id
return Microsoft.Research.DataOnboarding.DomainModel.File

GetItem() public method

Method to get file item based on the user id and filename
public GetItem ( int userId, string fileName ) : Microsoft.Research.DataOnboarding.DomainModel.File
userId int user Id
fileName string file Name
return Microsoft.Research.DataOnboarding.DomainModel.File

GetItem() public method

Method to get file by name identifier and file id.
public GetItem ( string nameIdentifier, int fileId ) : Microsoft.Research.DataOnboarding.DomainModel.File
nameIdentifier string Name Identifier
fileId int file id
return Microsoft.Research.DataOnboarding.DomainModel.File

RetrieveFileColumnTypes() public method

Method to Retrieve Column Types
public RetrieveFileColumnTypes ( ) : List
return List

RetrieveFileColumnUnits() public method

Method to Retrieve Column Units
public RetrieveFileColumnUnits ( ) : List
return List

RetrieveMetaDataTypes() public method

Method to get meta data types
public RetrieveMetaDataTypes ( ) : List
return List