Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2011-2013 the original author or authors.
  *
  * 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 org.springframework.data.mongodb.core.mapping;
import  org.springframework.core.convert.converter.Converter;
MongoDB specific org.springframework.data.mapping.PersistentProperty extension.

Author(s):
Oliver Gierke
Patryk Wasik
Thomas Darimont
Returns the name of the field a property is persisted to.

Returns:
Returns the order of the field if defined. Will return -1 if undefined.

Returns:
	int getFieldOrder();

Returns whether the propert is a com.mongodb.DBRef. If this returns true you can expect getDBRef() to return an non-null value.

Returns:
	boolean isDbReference();

Returns whether the property is explicitly marked as an identifier property of the owning PersistentEntity. A property is an explicit id property if it is annotated with

Returns:
See also:
Id.
Returns the DBRef if the property is a reference.

Returns:
See also:
isDbReference()
Simple Converter implementation to transform a MongoPersistentProperty into its field name.

Author(s):
Oliver Gierke
	public enum PropertyToFieldNameConverter implements Converter<MongoPersistentPropertyString> {
		INSTANCE;
		/*
		 * (non-Javadoc)
		 * @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
		 */
			return source.getFieldName();
		}
	}

Returns whether property access shall be used for reading the property value. This means it will use the getter instead of field access.

Returns:
	boolean usePropertyAccess();
New to GrepCode? Check out our FAQ X