Coverage report

  %line %branch
org.apache.portals.graffito.jcr.mapper.model.BeanDescriptor
0% 
0% 

 1  
 /*
 2  
  * Copyright 2000-2005 The Apache Software Foundation.
 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.apache.portals.graffito.jcr.mapper.model;
 17  
 
 18  
 
 19  
 import org.apache.portals.graffito.jcr.persistence.objectconverter.BeanConverter;
 20  
 import org.apache.portals.graffito.jcr.persistence.objectconverter.impl.ObjectConverterImpl;
 21  
 import org.apache.portals.graffito.jcr.reflection.ReflectionUtils;
 22  
 
 23  
 /**
 24  
  * BeanDescriptor is used by the mapper to read general information on a bean field
 25  
  *
 26  
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
 27  
  * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
 28  
  */
 29  0
 public class BeanDescriptor {
 30  
     private ClassDescriptor classDescriptor;
 31  
     
 32  
     private String fieldName;
 33  
     private String jcrName;
 34  
     private boolean proxy;
 35  
     private boolean inline;
 36  
     private String converter;
 37  
     private BeanConverter beanConverter;
 38  
     private String jcrNodeType;
 39  
     private boolean jcrAutoCreated;
 40  
     private boolean jcrMandatory;
 41  
     private String jcrOnParentVersion;
 42  
     private boolean jcrProtected;
 43  
     private boolean jcrSameNameSiblings;
 44  
 
 45  
     /**
 46  
      * @return Returns the fieldName.
 47  
      */
 48  
     public String getFieldName() {
 49  0
         return fieldName;
 50  
     }
 51  
 
 52  
     /**
 53  
      * @param fieldName The fieldName to set.
 54  
      */
 55  
     public void setFieldName(String fieldName) {
 56  0
         this.fieldName = fieldName;
 57  0
     }
 58  
 
 59  
     /**
 60  
      * @return Returns the jcrName.
 61  
      */
 62  
     public String getJcrName() {
 63  0
         return jcrName;
 64  
     }
 65  
 
 66  
     /**
 67  
      * @param jcrName The jcrName to set.
 68  
      */
 69  
     public void setJcrName(String jcrName) {
 70  0
         this.jcrName = jcrName;
 71  0
     }
 72  
 
 73  
     /**
 74  
      * @return Returns the proxy.
 75  
      */
 76  
     public boolean isProxy() {
 77  0
         return proxy;
 78  
     }
 79  
 
 80  
     /**
 81  
      * @param proxy The proxy to set.
 82  
      */
 83  
     public void setProxy(boolean proxy) {
 84  0
         this.proxy = proxy;
 85  0
     }
 86  
 
 87  
     /**
 88  
      * Are the current bean properties inlined in the parent
 89  
      * 
 90  
      * @return <tt>true</tt> if bean's properties are inlined in the parent node
 91  
      */
 92  
     public boolean isInline() {
 93  0
         return this.inline;
 94  
     }
 95  
 
 96  
     /**
 97  
      * Sets if the bean's properties should be inlined in the parent
 98  
      * instead of being persisted on a subnode
 99  
      * 
 100  
      * @param flag <tt>true</tt> if the bean properties should be inlined
 101  
      */
 102  
     public void setInline(boolean flag) {
 103  0
         this.inline = flag;
 104  0
     }
 105  
 
 106  
     /**
 107  
      * Get the <code>BeanConverter</code> fully qualified name or <tt>null</tt>
 108  
      * if none specified by the bean descriptor.
 109  
      * 
 110  
      * @return fully qualified class name or <tt>null</tt>
 111  
      */
 112  
     public String getConverter() {
 113  0
         return this.converter;
 114  
     }
 115  
 
 116  
     /**
 117  
      * Sets the fully qualified name of a <code>BeanConverter</code> to be used.
 118  
      * 
 119  
      * @param converterClass a fully qualified class name
 120  
      */
 121  
     public void setConverter(String converterClass) {
 122  0
         this.converter = converterClass;
 123  0
     }
 124  
 
 125  
     public BeanConverter getBeanConverter() {
 126  0
         if(null == this.beanConverter && class="keyword">null != class="keyword">this.converter) {
 127  0
             this.beanConverter = (BeanConverter) ReflectionUtils.newInstance(class="keyword">this.converter);
 128  
         }
 129  
         
 130  0
         return this.beanConverter;
 131  
     }
 132  
     
 133  
     /** Getter for property jcrNodeType.
 134  
      *
 135  
      * @return jcrNodeType
 136  
      */
 137  
     public String getJcrNodeType() {
 138  0
         return jcrNodeType;
 139  
     }
 140  
 
 141  
     /** Setter for property jcrNodeType.
 142  
      *
 143  
      * @param value jcrNodeType
 144  
      */
 145  
     public void setJcrNodeType(String value) {
 146  0
         this.jcrNodeType = value;
 147  0
     }
 148  
 
 149  
     /** Getter for property jcrAutoCreated.
 150  
      *
 151  
      * @return jcrAutoCreated
 152  
      */
 153  
     public boolean isJcrAutoCreated() {
 154  0
         return jcrAutoCreated;
 155  
     }
 156  
 
 157  
     /** Setter for property jcrAutoCreated.
 158  
      *
 159  
      * @param value jcrAutoCreated
 160  
      */
 161  
     public void setJcrAutoCreated(boolean value) {
 162  0
         this.jcrAutoCreated = value;
 163  0
     }
 164  
 
 165  
     /** Getter for property jcrMandatory.
 166  
      *
 167  
      * @return jcrMandatory
 168  
      */
 169  
     public boolean isJcrMandatory() {
 170  0
         return jcrMandatory;
 171  
     }
 172  
 
 173  
     /** Setter for property jcrMandatory.
 174  
      *
 175  
      * @param value jcrMandatory
 176  
      */
 177  
     public void setJcrMandatory(boolean value) {
 178  0
         this.jcrMandatory = value;
 179  0
     }
 180  
 
 181  
     /** Getter for property jcrOnParentVersion.
 182  
      *
 183  
      * @return jcrOnParentVersion
 184  
      */
 185  
     public String getJcrOnParentVersion() {
 186  0
         return jcrOnParentVersion;
 187  
     }
 188  
 
 189  
     /** Setter for property jcrOnParentVersion.
 190  
      *
 191  
      * @param value jcrOnParentVersion
 192  
      */
 193  
     public void setJcrOnParentVersion(String value) {
 194  0
         this.jcrOnParentVersion = value;
 195  0
     }
 196  
 
 197  
     /** Getter for property jcrProtected.
 198  
      *
 199  
      * @return jcrProtected
 200  
      */
 201  
     public boolean isJcrProtected() {
 202  0
         return jcrProtected;
 203  
     }
 204  
 
 205  
     /** Setter for property jcrProtected.
 206  
      *
 207  
      * @param value jcrProtected
 208  
      */
 209  
     public void setJcrProtected(boolean value) {
 210  0
         this.jcrProtected = value;
 211  0
     }
 212  
 
 213  
     /** Getter for property jcrSameNameSiblings.
 214  
      *
 215  
      * @return jcrSameNameSiblings
 216  
      */
 217  
     public boolean isJcrSameNameSiblings() {
 218  0
         return jcrSameNameSiblings;
 219  
     }
 220  
 
 221  
     /** Setter for property jcrSameNameSiblings.
 222  
      *
 223  
      * @param value jcrSameNameSiblings
 224  
      */
 225  
     public void setJcrSameNameSiblings(boolean value) {
 226  0
         this.jcrSameNameSiblings = value;
 227  0
     }
 228  
 
 229  
     /**
 230  
      * @param descriptor
 231  
      */
 232  
     public void setClassDescriptor(ClassDescriptor descriptor) {
 233  0
         this.classDescriptor = descriptor;
 234  0
     }
 235  
 
 236  
     /**
 237  
      * @return Returns the classDescriptor.
 238  
      */
 239  
     public ClassDescriptor getClassDescriptor() {
 240  0
         return classDescriptor;
 241  
     }
 242  
 }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.