Coverage Report - org.dozer.metadata.FieldMappingMetadata
 
Classes in this File Line Coverage Branch Coverage Complexity
FieldMappingMetadata
N/A
N/A
1
 
 1  
 /**
 2  
  * Copyright 2005-2013 Dozer Project
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *      http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.dozer.metadata;
 17  
 
 18  
 import org.dozer.classmap.MappingDirection;
 19  
 
 20  
 /**
 21  
  * This interface can be used to obtain information about the mapping between two fields.
 22  
  * @author  Florian Kunz
 23  
  */
 24  
 public interface FieldMappingMetadata {
 25  
 
 26  
         /**
 27  
          * @return The name of the source field.
 28  
          */
 29  
         String getSourceName();
 30  
         
 31  
         /**
 32  
          * @return The name of the destination field.
 33  
          */
 34  
         String getDestinationName();
 35  
         
 36  
         /** 
 37  
          * @return The name of the getter of the source field.
 38  
          */
 39  
         String getSourceFieldGetMethod();
 40  
         
 41  
         /** 
 42  
          * @return The name of the setter of the source field.
 43  
          */
 44  
         String getSourceFieldSetMethod();
 45  
         
 46  
         /** 
 47  
          * @return The name of the getter of the destination field.
 48  
          */
 49  
         String getDestinationFieldGetMethod();
 50  
         
 51  
         /** 
 52  
          * @return The name of the setter of the destination field.
 53  
          */
 54  
         String getDestinationFieldSetMethod();
 55  
         
 56  
         /**
 57  
          * @return true if nested objects are copied by reference. false if a deep copy 
 58  
          * is performed.
 59  
          */
 60  
         boolean isCopyByReference();
 61  
         
 62  
         boolean isSourceFieldAccessible();
 63  
         
 64  
         boolean isDestinationFieldAccessible();
 65  
         
 66  
         /**
 67  
          * Can be used to check whether a mapping in unidirectional or bidirectional.
 68  
          *  
 69  
          * @return An instance of {@link org.dozer.classmap.MappingDirection}.
 70  
          */
 71  
         MappingDirection getMappingDirection();
 72  
         
 73  
         /**
 74  
          * @return The date format used for conversions as a string.
 75  
          */
 76  
         String getDateFormat();
 77  
         
 78  
         /** 
 79  
          * The name of the custom converter class, or an empty string if no custom converter is used.
 80  
          *
 81  
          * @return The name of the custom converter class as a string.
 82  
          */
 83  
         String getCustomConverter();
 84  
         
 85  
 }