001/** 002 * Copyright (C) 2006-2026 Talend Inc. - www.talend.com 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.talend.sdk.component.api.component; 017 018import java.lang.annotation.ElementType; 019import java.lang.annotation.Retention; 020import java.lang.annotation.RetentionPolicy; 021import java.lang.annotation.Target; 022 023import org.talend.sdk.component.api.meta.Documentation; 024 025@Target({ ElementType.TYPE }) 026@Retention(RetentionPolicy.RUNTIME) 027@Documentation("Database types mapping. Studio will use this to generate the database mapping and allow to access to the DB" 028 + 029 " Column Types. Setting this to <code>custom</code> will allow to use the custom database mapping using an action." 030 + 031 " Setting this to an empty string will disable the database mapping and will not allow to access to the DB Column" 032 + 033 " type. The functionality is for the Studio only. ") 034public @interface DatabaseMapping { 035 036 /** 037 * The database type to map. 038 */ 039 String value() default Mapping.NONE; 040 041 /** 042 * The mapper function name to fetch the custom mapping according configuration. 043 */ 044 String mapping() default ""; 045 046 public static class Mapping { 047 048 public static final String CUSTOM = "custom"; // 049 050 public static final String NONE = ""; // default, no mappings. 051 052 private Mapping() { 053 // nop 054 } 055 } 056 057}