com.googlecode.jmapper.IMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jmapper-core Show documentation
Show all versions of jmapper-core Show documentation
JMapper Framework is a java bean mapper based on javassist. JMapper exposes
interesting features as relational mapping, dynamic conversions and more
The newest version!
/**
* Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.googlecode.jmapper;
import com.googlecode.jmapper.DestinationFactory;
/**
* This Interface contains all potential combinations between the enumerations:
*
* NullPointerControl
* MappingType
of <D>
* MappingType
of <S>
*
*
* @author Alessandro Vurro
*
* @param Type of the Destination Class
* @param Type of Source Class
*/
public interface IMapper {
/**
* Method used for all cases where a null values must be returned
* @param source instance of <S> class
* @return a null value
*/
D get(S source);
/**
* This Method returns a new instance of <D> type applying these criteria:
*
*NullPointerControl.SOURCE
only source is controlled
*MappingType.ALL_FIELDS
mapping type applied to destination
*MappingType.ALL_FIELDS
mapping type applied to source
*
*
* @param source instance that contains the data
* @return a new istance of <D> type
*/
D nullVSouAllAll(S source);
/**
* This Method returns a new instance of <D> type applying these criteria:
*
*NullPointerControl.SOURCE
only source is controlled
*MappingType.ALL_FIELDS
mapping type applied to destination
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to source
*
*
* @param source instance that contains the data
* @return a new istance of <D> type
*/
D nullVSouAllValued(S source);
/**
* This Method returns a new instance of <D> type applying these criteria:
*
*NullPointerControl.NOT_ANY
no instance is controlled
*MappingType.ALL_FIELDS
mapping type applied to destination
*MappingType.ALL_FIELDS
mapping type applied to source
*
*
* @param source instance that contains the data
* @return a new istance of <D> type
*/
D nullVNotAllAll(S source);
/**
* This Method returns a new instance of <D> type applying these criteria:
*
*NullPointerControl.NOT_ANY
no instance is controlled
*MappingType.ALL_FIELDS
mapping type applied to destination
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to source
*
*
* @param source instance that contains the data
* @return a new istance of <D> type
*/
D nullVNotAllValued(S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.ALL
both instances are controlled
*MappingType.ALL_FIELDS
mapping type applied to destination
*MappingType.ALL_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVAllAllAll(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.ALL
both instances are controlled
*MappingType.ALL_FIELDS
mapping type applied to destination
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVAllAllValued(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.ALL
both instances are controlled
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to destination
*MappingType.ALL_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVAllValuedAll(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.ALL
both instances are controlled
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to destination
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVAllValuedValued(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.ALL
both instances are controlled
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to destination
*MappingType.ONLY_NULL_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVAllValuedNull(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.ALL
both instances are controlled
*MappingType.ONLY_NULL_FIELDS
mapping type applied to destination
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVAllNullValued(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.DESTINATION
only destination is controlled
*MappingType.ALL_FIELDS
mapping type applied to destination
*MappingType.ALL_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVDesAllAll(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.DESTINATION
only destination is controlled
*MappingType.ALL_FIELDS
mapping type applied to destination
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVDesAllValued(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.DESTINATION
only destination is controlled
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to destination
*MappingType.ALL_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVDesValuedAll(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.DESTINATION
only destination is controlled
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to destination
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVDesValuedValued(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.DESTINATION
only destination is controlled
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to destination
*MappingType.ONLY_NULL_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVDesValuedNull(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.DESTINATION
only destination is controlled
*MappingType.ONLY_NULL_FIELDS
mapping type applied to destination
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVDesNullValued(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.SOURCE
only source is controlled
*MappingType.ALL_FIELDS
mapping type applied to destination
*MappingType.ALL_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVSouAllAll(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.SOURCE
only source is controlled
*MappingType.ALL_FIELDS
mapping type applied to destination
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVSouAllValued(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.SOURCE
only source is controlled
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to destination
*MappingType.ALL_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVSouValuedAll(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.SOURCE
only source is controlled
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to destination
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVSouValuedValued(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.SOURCE
only source is controlled
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to destination
*MappingType.ONLY_NULL_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVSouValuedNull(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.SOURCE
only source is controlled
*MappingType.ONLY_NULL_FIELDS
mapping type applied to destination
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVSouNullValued(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.NOT_ANY
no instance is controlled
*MappingType.ALL_FIELDS
mapping type applied to destination
*MappingType.ALL_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVNotAllAll(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.NOT_ANY
no instance is controlled
*MappingType.ALL_FIELDS
mapping type applied to destination
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVNotAllValued(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.NOT_ANY
no instance is controlled
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to destination
*MappingType.ALL_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVNotValuedAll(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.NOT_ANY
no instance is controlled
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to destination
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVNotValuedValued(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.NOT_ANY
no instance is controlled
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to destination
*MappingType.ONLY_NULL_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVNotValuedNull(D destination,S source);
/**
* This Method returns the destination given in input enriched with data contained in source given in input
* applying these criteria:
*
*NullPointerControl.NOT_ANY
no instance is controlled
*MappingType.ONLY_NULL_FIELDS
mapping type applied to destination
*MappingType.ONLY_VALUED_FIELDS
mapping type applied to source
*
*
* @param destination instance to enrich
* @param source instance that contains the data
* @return destination enriched
*/
D vVNotNullValued(D destination,S source);
/**
* @return the DesinationFactory instance
*/
DestinationFactory getDestinationFactory();
/**
* Permits to define a destination factory.
* @param factory destination factory
*/
void setDestinationFactory(DestinationFactory factory);
}