All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.datastax.driver.mapping.PropertyTransienceStrategy Maven / Gradle / Ivy

There is a newer version: 3.11.5
Show newest version
/*
 * Copyright (C) 2012-2017 DataStax Inc.
 *
 * 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.datastax.driver.mapping;

import java.util.Set;

/**
 * A strategy to determine which properties are transient, and which aren't.
 * 

* Transient properties will be ignored, whereas non-transient * ones will be mapped. */ public enum PropertyTransienceStrategy { /** * This strategy adopts a permissive, opt-out approach that * will consider a property to be non-transient by default, unless: *

    *
  1. The property is annotated with {@link com.datastax.driver.mapping.annotations.Transient @Transient};
  2. *
  3. The corresponding field is non-null and is marked with the keyword {@code transient};
  4. *
  5. The property name has been explicitly black-listed (see {@link DefaultPropertyMapper#setTransientPropertyNames(Set)}).
  6. *
*/ OPT_OUT, /** * This strategy adopts a conservative, opt-in approach that * only considers a property to be non-transient if it is explicitly annotated * with one of the following annotations: *
    *
  1. {@link com.datastax.driver.mapping.annotations.Column Column}
  2. *
  3. {@link com.datastax.driver.mapping.annotations.Computed Computed}
  4. *
  5. {@link com.datastax.driver.mapping.annotations.ClusteringColumn ClusteringColumn}
  6. *
  7. {@link com.datastax.driver.mapping.annotations.Frozen Frozen}
  8. *
  9. {@link com.datastax.driver.mapping.annotations.FrozenKey FrozenKey}
  10. *
  11. {@link com.datastax.driver.mapping.annotations.FrozenValue FrozenValue}
  12. *
  13. {@link com.datastax.driver.mapping.annotations.PartitionKey PartitionKey}
  14. *
  15. {@link com.datastax.driver.mapping.annotations.Field Field}
  16. *
*/ OPT_IN }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy