English 中文(简体)
单州模式诉集装箱 统一控制生命线
原标题:Singleton Pattern vs. ContainerControlled LifeTImeManager in Unity

数据库的变化

页: 1

2 - 增加新的表格iC_ProductDimensions,以掌握产品的不同层面数据。 下文详细介绍了在iC_ProductDimensions中使用的不同栏目。

1- DimensionId - This is the primary key in the table and of bigint datatype.

2- UOMID -  (FK) Unit of Measurement ID , this is refrenced from the table iC_ProductUnitOfMeasure.

3- ProductFeatureId : This is referenced column from the iC_ProductFeature table.

4- NumericValue  : This column stores the dimensional value (e.g. if UOM is pound and this column stores 10 than we can say that Weight of product is 10 pound.

在iC_ProductUnitOfMeasure中添加了3-1栏测量Type。

4- 从瓦尔果(100)改为大豆的产品名称数据类型

数据流动

计量 IC_ProductUnitOfMeasure的类型将储存用于哪一个电动单位的测量。

e.g. let s take a snapshot view of  rows in iC_ProductUnitOfMeasure 


    UOMID  Abbrivation         MeasurementType         Description 

    1              lb          Weight           This UOM is used for measuring weight of the product 
    2              inch.       Width            This UOM is used for measuring width of the product 
    3              meter       Length           This UOM is used for measuring length of the product 
    4              Kg          Weight           This UOM is used for measuring weight  of product  in Kg.

在上述例子中,我们把每个南太平洋大学同其联系测量Type挂钩。

UOM 1可用于测量四氧化硫中产品重量。

添加产品年限为0.5米的产品,产品宽度为50英寸,产品重量为100磅。

1 - 在iC_Product table上创记录,储存产品的共同特性。 (支持产品Id = ICPR0001)

2- 在iC_ProductFeature中创下记录,并储存彩色、体积、重量、 h/w等共同产品特征。 (产品名称一)

3- 如下文所示,在iC_ProductDimesion表上设立3个记录。

DimensionID UOMID ProductFeatureId NumericValue 
1           1     1                100 
2           2     1                50 
3           3     1                0.5 

4- 在IC_ProductFeatureApplicability with (ProductId = ICPR0001 and ProductsFeature)中添加一个记录 Id = 1

获取产品不同层面价值的数据ICPR001

select 

          product .* , 
          productFeature.* ,
          ( CAST (dimension.NumericValue  as Varchar(100) )+" " + UOM.Abbrivation) as Dimension ,
          dimension.MeasurementType

         from 
                iC_Product product , 
                iC_ProductFeature productFeature , 
                iC_ProductFeatureApplicability , 
                iC_ProductDimesions dimension , 
                iC_ProductUnitOfMeasure UOM

where

 iC_ProductFeatureApplicability.ProductId = product.ProductId  

and 

 iC_ProductFeatureApplicability.ProductFeatureId = productFeature.ProductFeatureId 

and 

dimension.ProductFeatureId = productFeature.ProductFeatureId 

and 

dimension.UOMID= UOM.UOMID

and 

 product.ProductId =  ICPR001         
最佳回答

真正的单一州只能一度出现(在有些执行中,每读过一次)。

“团结一生管理”只是让团结永远回到同一情况的一种选择;这种情况实际上不可能被设计成单一州,因此,原则上,你仍可以手工制造其他情况。

见我对

问题回答

单一州模式是模式本身,即“团结”(implements>/em>,这种模式在几个地方(包括大多数终身管理人员)出现。

根据定义,单一州不能被 mo弄——它们只打算有一例。 如果你使用单一吨的代码通过接口进行,那么有可能改变这种接口的类型,但你不能 mo弄单一吨本身。

至于单州模式是否是反家长,我不认为是。 我认为,它常常被过分使用,而且往往被实施,以取代更好的解决办法。 不过,我认为这并不是反对这种模式本身的一个标志。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...