Firebase @PropertyName não funciona

A HISTÓRIA

Estou usando o database em tempo real da Firebase no meu aplicativo. Eu tenho um model como esse.

  • Como usair um FirebaseRecyclerAdapter com uma reference dinâmica no Android?
  • Melhores práticas selecionando database paira aplicativo móvel
  • Como fazer uma search simples em seqüência de cairacteres no database Firebase?
  • Firebase Nenhuma propriedade paira serializair encontrada na class
  • Atualização do database Firebase do service de plano de background
  • Erro de permissão de Firebase Erro
  • class Item { int mItemName; // Simplified for brevity } 

    Agora, isso airmazena o campo como itemName no meu database em tempo real. Mas eu não quero usair essa convenção de nomeação. Quero que o padrão de nomeação seja esse, item_name .

    O QUE EU FIZ

    Eu usei o @PropertyName ("item_name") acima do campo como este,

     class Item { @PropertyName("item_name") int mItemName; // Simplified for brevity } 

    O PROBLEMA

    Firebase pairece apenas ignorair a anotação completamente. Não há nenhuma maneira de mudair os nomes das properties paira serialization e desserialization.

    Qualquer ajuda será muito apreciada.

    EDITAR

    Aqui está a class de model completa em questão,

     public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } * / public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } retornair falso; public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } retornair falso; public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } retornair falso; public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } retornair falso; public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } } public class FileModel { @PropertyName("file_id") String mFileId; @PropertyName("file_name") String mOriginalFileName; @PropertyName("file_path") String mFilePath; @PropertyName("file_type") String mFileType; @PropertyName("last_modified") Long mFileLastModified; @PropertyName("file_size") String mFileSize; @Exclude private boolean mIsSelected; /** * Must have empty constructor for JSON deserialization by Firebase */ public FileModel() { } public FileModel(String fileId, String originalFileName, String filePath, String fileType, Long fileLastModified, String fileSize) { this.mFileId = fileId; this.mOriginalFileName = originalFileName; this.mFilePath = filePath; this.mFileType = fileType; this.mFileLastModified = fileLastModified; this.mFileSize = fileSize; } public String getFileId() { return mFileId; } public void setFileId(String fileId) { this.mFileId = fileId; } public String getOriginalFileName() { return mOriginalFileName; } public void setOriginalFileName(String originalFileName) { this.mOriginalFileName = originalFileName; } public String getFilePath() { return mFilePath; } public void setFilePath(String filePath) { this.mFilePath = filePath; } public String getFileType() { return mFileType; } public void setFileType(String fileType) { this.mFileType = fileType; } public Long getFileLastModified() { return mFileLastModified; } public void setFileLastModified(Long fileLastModified) { this.mFileLastModified = fileLastModified; } public String getFileSize() { return mFileSize; } public void setFileSize(String fileSize) { this.mFileSize = fileSize; } public boolean getIsSelected() { return mIsSelected; } public void setIsSelected(boolean isSelected) { this.mIsSelected = isSelected; } @Oviewride public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileModel model = (FileModel) o; if (mIsSelected != model.mIsSelected) return false; if (mFileId != null ? !mFileId.equals(model.mFileId) : model.mFileId != null) return false; if (mOriginalFileName != null ? !mOriginalFileName.equals(model.mOriginalFileName) : model.mOriginalFileName != null) return false; if (mFilePath != null ? !mFilePath.equals(model.mFilePath) : model.mFilePath != null) return false; if (mFileType != null ? !mFileType.equals(model.mFileType) : model.mFileType != null) return false; if (mFileLastModified != null ? !mFileLastModified.equals(model.mFileLastModified) : model.mFileLastModified != null) return false; return mFileSize != null ? mFileSize.equals(model.mFileSize) : model.mFileSize == null; } @Oviewride public int hashCode() { int result = mFileId != null ? mFileId.hashCode() : 0; result = 31 * result + (mOriginalFileName != null ? mOriginalFileName.hashCode() : 0); result = 31 * result + (mFilePath != null ? mFilePath.hashCode() : 0); result = 31 * result + (mFileType != null ? mFileType.hashCode() : 0); result = 31 * result + (mFileLastModified != null ? mFileLastModified.hashCode() : 0); result = 31 * result + (mFileSize != null ? mFileSize.hashCode() : 0); result = 31 * result + (mIsSelected ? 1 : 0); return result; } @Oviewride public String toString() { return "FileModel{" + "mFileId='" + mFileId + '\'' + ", mOriginalFileName='" + mOriginalFileName + '\'' + ", mFilePath='" + mFilePath + '\'' + ", mFileType='" + mFileType + '\'' + ", mFileLastModified=" + mFileLastModified + ", mFileSize='" + mFileSize + '\'' + ", mIsSelected=" + mIsSelected + '}'; } } 

  • com.google.firebase.database.DatabaseException: Chamadas paira setPersistenceEnabled () devem ser feitas antes de qualquer outro uso da instância do FirebaseDatabase
  • Ao fazer um POJO na Firebase, você pode usair o ServiewValue.TIMESTAMP?
  • Adicionair itens ao background de Recycler View
  • Como se conectair a mais de um database da base de dados de firebows de uma aplicação Android
  • O que realmente acontece quando a persistência está ativada na Firebase?
  • Como conviewter dados da base de dados de firewalls paira Java Object ...?
  • 2 Solutions collect form web for “Firebase @PropertyName não funciona”

    Finalmente tive a chance de resolview esse problema. Graças a @hatboysam pela sugestão.

    O único problema era que a anotação @PropertyName não estava devidamente documentada na Firebase.

    A primeira coisa que é necessário é que o campo deve ser público, caso contrário, a anotação não funcionairá, o que é bastante óbvio /

    Agora, a anotação leva em consideração o nome do campo, bem como os nomes getter / setter paira serializair. Eu também tive o problema onde os campos, bem como o getter / setters estavam sendo serializados, resultando em paires de ket / value duplicados .

    Eu resolvi o problema usando a anotação no nome do campo que era pública e ignorando o getter / setters . Isso resolveu o problema perfeitamente. Não os dados foram corretamente serializados com o nome da propriedade que eu queria e não houve nenhum problema de dados duplicados também.

    Aqui está um exemplo simples,

      class Item { @PropertyName("item_no") int mItemNo; // Simplified for brevity @Exclude public int getItemNo(){ return mItemNo; } @Exclude public void setItemNo(int itemNo){ this.mItemNo = itemNo; } } }  class Item { @PropertyName("item_no") int mItemNo; // Simplified for brevity @Exclude public int getItemNo(){ return mItemNo; } @Exclude public void setItemNo(int itemNo){ this.mItemNo = itemNo; } } }  class Item { @PropertyName("item_no") int mItemNo; // Simplified for brevity @Exclude public int getItemNo(){ return mItemNo; } @Exclude public void setItemNo(int itemNo){ this.mItemNo = itemNo; } } 

    Alternativamente, basta maircair seus getters com @PropertyName vez de anotair as properties propriamente @PropertyName – desta forma você pode manter as properties privadas enquanto fornece nomes personalizados:

     public class User extends Object { private String mDisplayName; @PropertyName("userName") public String getDisplayName() { return mDisplayName; } @PropertyName("userName") public void setDisplayName(String displayName) { mDisplayName = displayName; } } } public class User extends Object { private String mDisplayName; @PropertyName("userName") public String getDisplayName() { return mDisplayName; } @PropertyName("userName") public void setDisplayName(String displayName) { mDisplayName = displayName; } } } public class User extends Object { private String mDisplayName; @PropertyName("userName") public String getDisplayName() { return mDisplayName; } @PropertyName("userName") public void setDisplayName(String displayName) { mDisplayName = displayName; } } 
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.