fr.ird.observe.dto.reference.DataDtoReferenceDefinition Maven / Gradle / Ivy
Show all versions of common-dto Show documentation
package fr.ird.observe.dto.reference;
/*-
* #%L
* ObServe Toolkit :: Common Dto
* %%
* Copyright (C) 2017 - 2020 IRD, Ultreia.io
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* .
* #L%
*/
import com.google.common.collect.ImmutableMap;
import fr.ird.observe.dto.data.DataDto;
import java.util.function.Function;
/**
* Describe the definition of a reference on a dto.
*
* Created on 11/11/15.
*
* @author Tony Chemit - [email protected]
*/
public class DataDtoReferenceDefinition> extends DtoReferenceDefinition {
private static final long serialVersionUID = 1L;
public static > Builder> builder(Class dtoType, Class type) {
return new Builder>(dtoType, type) {
@Override
public DataDtoReferenceDefinition build() {
return new DataDtoReferenceDefinition<>(dtoType, referenceType, propertiesBuilder.build(), functionsBuilder.build());
}
};
}
protected DataDtoReferenceDefinition(Class dtoType, Class referenceType, ImmutableMap> properties, ImmutableMap> functions) {
super(dtoType, referenceType, properties, functions);
}
}