001package io.ebean.annotation; 002 003import java.lang.annotation.ElementType; 004import java.lang.annotation.Retention; 005import java.lang.annotation.RetentionPolicy; 006import java.lang.annotation.Target; 007 008/** 009 * Specify that the underlying table is partitioned. 010 * <p> 011 * This is currently only useful for Postgres 10 range partitioned tables and not used for any other database 012 * or ElasticSearch or other non-range partitioning. 013 * </p> 014 * <p> 015 * This modifies the Postgres DDL generation only adding range partitioning clause and suppressing foreign 016 * key constraints to partitioned tables. 017 * </p> 018 */ 019@Retention(RetentionPolicy.RUNTIME) 020@Target(ElementType.TYPE) 021public @interface DbPartition { 022 023 /** 024 * The partition mode. 025 */ 026 PartitionMode mode(); 027 028 /** 029 * The property or column to partition on. 030 */ 031 String property(); 032}