com.mangopay.core.Dto Maven / Gradle / Ivy
The newest version!
package com.mangopay.core;
import java.lang.reflect.Type;
import java.util.*;
/**
* Base abstract class for entities.
*/
public abstract class Dto {
/**
* Gets map which property is an object and what type of object.
* To be overridden in child class if has any sub objects.
* @return Collection of field name-field type pairs.
*/
public Map getSubObjects() { return new HashMap<>(); }
/**
* Gets the structure that maps which property depends on other property.
* To be overridden in child class if has any dependent objects.
* @return
*/
public Map>>> getDependentObjects() { return new HashMap<>(); }
/**
* Gets map of fields and values.
* To be overridden in child class.
* @return Collection of field name-field value pairs.
*/
public Map getValues() { return new HashMap<>(); }
/**
* Gets the collection of read-only fields names.
* To be overridden in child class.
* @return List of field names.
*/
public ArrayList getReadOnlyProperties() { return new ArrayList<>(); }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy