Create percolator when collection is created.

    :param mapper: Not used. It keeps the function signature.
    :param connection: Not used. It keeps the function signature.
    :param target: Collection where the percolator should be updated.
323340
def collection_updated_percolator(mapper, connection, target):
    
    delete_collection_percolator(target)
    if target.dbquery is not None:
        new_collection_percolator(target)
392208
public static void mapping(String mappedFieldName,Class<?> mappedClass, Class<?> targetClass){
		throw new MappingErrorException(MSG.INSTANCE.message(mappingErrorException2,mappedFieldName,mappedClass.getSimpleName(),targetClass.getSimpleName()));
	}
1299619
public <T> DynamicJdbcMapper<T> newMapper(final TypeReference<T> target) {
        return newMapper(target.getType());
    }
349240
public <T> JoinBuilder<Q, K,T> join(Path<T> ref, Path<T> target) {
        return new JoinBuilder<Q, K,T>(queryMixin, ref, target);
    }
430196
@SuppressWarnings("unchecked")
  @Override
  public <T> T newInstance(Target<T> target) {
    Map<String, MethodHandler> nameToHandler = targetToHandlersByName.apply(target);
    Map<Method, MethodHandler> methodToHandler = new LinkedHashMap<Method, MethodHandler>();
    List<DefaultMethodHandler> defaultMethodHandlers = new LinkedList<DefaultMethodHandler>();

    for (Method method : target.type().getMethods()) {
      if (method.getDeclaringClass() == Object.class) {
        continue;
      } else if (Util.isDefault(method)) {
        DefaultMethodHandler handler = new DefaultMethodHandler(method);
        defaultMethodHandlers.add(handler);
        methodToHandler.put(method, handler);
      } else {
        methodToHandler.put(method, nameToHandler.get(Feign.configKey(target.type(), method)));
      }
    }
    InvocationHandler handler = factory.create(target, methodToHandler);
    T proxy = (T) Proxy.newProxyInstance(target.type().getClassLoader(),
        new Class<?>[] {target.type()}, handler);

    for (DefaultMethodHandler defaultMethodHandler : defaultMethodHandlers) {
      defaultMethodHandler.bindTo(proxy);
    }
    return proxy;
  }
315073
def new_mapper(agent):
    """"""
    recp = recipient.Broadcast(MappingUpdatesPoster.protocol_id, 'lobby')
    return agent.initiate_protocol(MappingUpdatesPoster, recp)
462393
def connect_signals(self, target):
        
        if self.connected:
            raise RuntimeError("GtkBuilder can only connect signals once")
        self.builder.connect_signals(target)
        self.connected = True
1314687
def create_poller(self, **kwargs):
        
        cacheablesource = \
            createObject(kwargs['cacheablesource'].attrib['factory'], 
                         kwargs['cacheablesource'])
        cachearea = \
            createObject(kwargs['cachearea'].attrib['factory'], 
                         kwargs['cachearea'])
        poll = abs(int(kwargs['cacheablesource'].attrib['poll']))
        logger.info("Poller create for cacheablesource id %s and cachearea id %s" \
                        % (kwargs['cacheablesource'].attrib['id'], \
                          kwargs['cachearea'].attrib['id'])
                        )
        return (cacheablesource, cachearea, poll)
433351
def target_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/targets.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
1337331
public void setTarget(Map<String, Object> target) {
        removeEntriesStartingWith(TARGET);
        eventMap.putAll(target);
    }
767464
def _bind_target(self, target, ctx=None):
        

        result = target

        try:
            # get annotations from target if exists.
            local_annotations = get_local_property(
                target, Annotation.__ANNOTATIONS_KEY__, [], ctx=ctx
            )
        except TypeError:
            raise TypeError('target {0} must be hashable.'.format(target))

        # if local_annotations do not exist, put them in target
        if not local_annotations:
            put_properties(
                target,
                properties={Annotation.__ANNOTATIONS_KEY__: local_annotations},
                ctx=ctx
            )

        # insert self at first position
        local_annotations.insert(0, self)

        # add target to self targets
        if target not in self.targets:
            self.targets.append(target)

        return result
290881
protected static PreparedStatement memorize(final PreparedStatement target, final ConnectionHandle connectionHandle) {
		return (PreparedStatement) Proxy.newProxyInstance(
				PreparedStatementProxy.class.getClassLoader(),
				new Class[] {PreparedStatementProxy.class},
				new MemorizeTransactionProxy(target, connectionHandle));
	}
124063
@Override
    protected Connection proxyConnection(Connection target, ConnectionCallback callback) {
        return new ConnectionDecorator(target, callback);
    }
855900
protected boolean onCacheMiss(T target) {
        boolean cached = matcher.matches(target);
        map.put(target, cached);
        return cached;
    }
1158689
public <T> AnyEmbeddedBuilder<Q, K> anyEmbedded(Path<? extends Collection<T>> collection, Path<T> target) {
        return new AnyEmbeddedBuilder<Q, K>(queryMixin, collection);
    }
160076
def _new_percolator(spec, search_pattern):
    """"""
    if spec and search_pattern:
        query = query_string_parser(search_pattern=search_pattern).to_dict()
        for index in current_search.mappings.keys():
            # Create the percolator doc_type in the existing index for >= ES5
            # TODO: Consider doing this only once in app initialization
            percolator_doc_type = _get_percolator_doc_type(index)
            _create_percolator_mapping(index, percolator_doc_type)
            current_search_client.index(
                index=index, doc_type=percolator_doc_type,
                id='oaiset-{}'.format(spec),
                body={'query': query}
            )
239065
@Deprecated
    public static <T> BiRecordGetter<T, RuntimeException> createBiRecordGetterByTargetClass(final Class<? extends T> targetClass) {
        if (Object[].class.isAssignableFrom(targetClass)) {
            return new BiRecordGetter<T, RuntimeException>() {
                @Override
                public T apply(ResultSet rs, List<String> columnLabelList) throws SQLException {
                    final int columnCount = columnLabelList.size();
                    final Object[] a = Array.newInstance(targetClass.getComponentType(), columnCount);

                    for (int i = 0; i < columnCount; i++) {
                        a[i] = JdbcUtil.getColumnValue(rs, i + 1);
                    }

                    return (T) a;
                }
            };
        } else if (List.class.isAssignableFrom(targetClass)) {
            return new BiRecordGetter<T, RuntimeException>() {

                private final boolean isListOrArrayList = targetClass.equals(List.class) || targetClass.equals(ArrayList.class);

                @Override
                public T apply(ResultSet rs, List<String> columnLabelList) throws SQLException {
                    final int columnCount = columnLabelList.size();
                    final List<Object> c = isListOrArrayList ? new ArrayList<Object>(columnCount) : (List<Object>) N.newInstance(targetClass);

                    for (int i = 0; i < columnCount; i++) {
                        c.add(JdbcUtil.getColumnValue(rs, i + 1));
                    }

                    return (T) c;
                }
            };
        } else if (Map.class.isAssignableFrom(targetClass)) {
            return new BiRecordGetter<T, RuntimeException>() {
                private final boolean isMapOrHashMap = targetClass.equals(Map.class) || targetClass.equals(HashMap.class);
                private final boolean isLinkedHashMap = targetClass.equals(LinkedHashMap.class);

                @Override
                public T apply(ResultSet rs, List<String> columnLabelList) throws SQLException {
                    final int columnCount = columnLabelList.size();
                    final Map<String, Object> m = isMapOrHashMap ? new HashMap<String, Object>(columnCount)
                            : (isLinkedHashMap ? new LinkedHashMap<String, Object>(columnCount) : (Map<String, Object>) N.newInstance(targetClass));

                    for (int i = 0; i < columnCount; i++) {
                        m.put(columnLabelList.get(i), JdbcUtil.getColumnValue(rs, i + 1));
                    }

                    return (T) m;
                }
            };
        } else if (N.isEntity(targetClass)) {
            return new BiRecordGetter<T, RuntimeException>() {
                private final boolean isDirtyMarker = N.isDirtyMarker(targetClass);
                private volatile String[] columnLabels = null;
                private volatile Method[] propSetters;
                private volatile Type<?>[] columnTypes = null;

                @Override
                public T apply(ResultSet rs, List<String> columnLabelList) throws SQLException {
                    final int columnCount = columnLabelList.size();

                    String[] columnLabels = this.columnLabels;
                    Method[] propSetters = this.propSetters;
                    Type<?>[] columnTypes = this.columnTypes;

                    if (columnLabels == null) {
                        columnLabels = columnLabelList.toArray(new String[columnLabelList.size()]);
                        this.columnLabels = columnLabels;
                    }

                    if (columnTypes == null || propSetters == null) {
                        final EntityInfo entityInfo = ParserUtil.getEntityInfo(targetClass);
                        final Map<String, String> column2FieldNameMap = getField2ColumnNameMap(targetClass);

                        propSetters = new Method[columnCount];
                        columnTypes = new Type[columnCount];

                        for (int i = 0; i < columnCount; i++) {
                            propSetters[i] = ClassUtil.getPropSetMethod(targetClass, columnLabels[i]);

                            if (propSetters[i] == null) {
                                String fieldName = column2FieldNameMap.get(columnLabels[i]);

                                if (N.isNullOrEmpty(fieldName)) {
                                    fieldName = column2FieldNameMap.get(columnLabels[i].toLowerCase());
                                }

                                if (N.notNullOrEmpty(fieldName)) {
                                    propSetters[i] = ClassUtil.getPropSetMethod(targetClass, fieldName);
                                }
                            }

                            if (propSetters[i] == null) {
                                columnLabels[i] = null;
                                throw new IllegalArgumentException(
                                        "No property in class: " + ClassUtil.getCanonicalClassName(targetClass) + " mapping to column: " + columnLabels[i]);
                            } else {
                                columnTypes[i] = entityInfo.getPropInfo(columnLabels[i]).type;
                            }
                        }

                        this.propSetters = propSetters;
                        this.columnTypes = columnTypes;
                    }

                    final Object entity = N.newInstance(targetClass);

                    for (int i = 0; i < columnCount; i++) {
                        if (columnLabels[i] == null) {
                            continue;
                        }

                        ClassUtil.setPropValue(entity, propSetters[i], columnTypes[i].get(rs, i + 1));
                    }

                    if (isDirtyMarker) {
                        ((DirtyMarker) entity).markDirty(false);
                    }

                    return (T) entity;
                }
            };
        } else {
            throw new IllegalArgumentException(targetClass.getCanonicalName() + " is not an Array/List/Map/Entity class");
        }
    }