Package org.apache.cayenne.map

Examples of org.apache.cayenne.map.DbEntity.addAttribute()


                        + jpaColumn.getTable()
                        + "'");
                return false;
            }

            entity.addAttribute(dbAttribute);
            return false;
        }
    }

    class JpaJoinColumnVisitor extends BaseTreeVisitor {
View Full Code Here


            // a barebone version, with all remaining properties to be set later
            entity = new DbEntity(tableName);
            dataMap.addDbEntity(entity);
        }

        entity.addAttribute(dbAttribute);
    }

    private String getSecondaryTableDbRelationshipName(String secondaryTableName) {
        return "$cay_secondary_" + secondaryTableName;
    }
View Full Code Here

                            columnType,
                            columnSize,
                            decimalDigits,
                            allowNulls);
                    attr.setEntity(dbEntity);
                    dbEntity.addAttribute(attr);
                }
            }
            finally {
                rs.close();
            }
View Full Code Here

                    }

                    dbAttr = new EODbAttribute(dbAttrName, TypesMapping
                            .getSqlTypeByJava(javaType), dbEntity);
                    dbAttr.setEoAttributeName(attrName);
                    dbEntity.addAttribute(dbAttr);

                    int width = getInt("width", attrMap, prototypeAttrMap, -1);
                    if (width >= 0) {
                        dbAttr.setMaxLength(width);
                    }
View Full Code Here

                            new SQLTemplate(
                                    Artist.class,
                                    "alter table ARTIST ADD COLUMN SMALLINT_UNSIGNED SMALLINT UNSIGNED NULL"));

            DbEntity artistDB = getDbEntity("ARTIST");
            artistDB.addAttribute(new DbAttribute(
                    "SMALLINT_UNSIGNED",
                    Types.SMALLINT,
                    artistDB));

            ObjEntity artistObj = getObjEntity("Artist");
View Full Code Here

                            columnType,
                            columnSize,
                            decimalDigits,
                            allowNulls);
                    attr.setEntity(dbEntity);
                    dbEntity.addAttribute(attr);
                }
            }
            finally {
                rs.close();
            }
View Full Code Here

                            columnType,
                            columnSize,
                            decimalDigits,
                            allowNulls);
                    attr.setEntity(dbEntity);
                    dbEntity.addAttribute(attr);
                }
            }
            finally {
                rs.close();
            }
View Full Code Here

                    }

                    dbAttr = new EODbAttribute(dbAttrName, TypesMapping
                            .getSqlTypeByJava(javaType), dbEntity);
                    dbAttr.setEoAttributeName(attrName);
                    dbEntity.addAttribute(dbAttr);

                    int width = getInt("width", attrMap, prototypeAttrMap, -1);
                    if (width >= 0) {
                        dbAttr.setMaxLength(width);
                    }
View Full Code Here

            if (entity == null) {
                throw new JpaProviderException("No DbEntity defined for table  "
                        + jpaColumn.getTable());
            }

            entity.addAttribute(dbAttribute);

            return false;
        }
    }
View Full Code Here

                        + jpaColumn.getTable()
                        + "'");
                return false;
            }

            entity.addAttribute(dbAttribute);
            return false;
        }
    }

    class JpaJoinColumnVisitor extends BaseTreeVisitor {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.